• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X Scripting - Skill
  3. How to add a user-defined subclass

Stats

  • State Suggested Answer
  • Replies 8
  • Answers 1
  • Subscribers 17
  • Views 2445
  • Members are here 0
More Content

How to add a user-defined subclass

EdwinB
EdwinB over 1 year ago

Hi,

Is there a way to add a user-defined subclass to the Define Subclass dialog box using Skill?

For example:

I want to add "MY_SUBCLASS" to the "BOARD GEOMETRY" class. If so, how do you go about it?

I am doing this to reduce the time spent manually adding the subclasses in the Define Subclass dialog box. I have about 50+ subclasses to add to different the Classes.

Thank you,

Eddie

  • Sign in to reply
  • Cancel
  • eDave
    0 eDave over 1 year ago

    Yes. Try axlLayerCreateNonConductor("BOARD GEOMETRY/MY_SUBCLASS")

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • EdwinB
    0 EdwinB over 1 year ago in reply to eDave

    Hi Dave,

    Thank you for the feedback. I'll give it a try and let you know if it works.

    EddieB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • EdwinB
    0 EdwinB over 1 year ago in reply to EdwinB

    Hi Dave,

    I'm not sure if I'm doing this correctly but it's giving me an error code:

    "*Error* axlLayerCreateNonConductor: argument #1 should be a string (type template = "t") - nil"

    Here's the skill I'm using:

    ===============

    procedure(runMexx()

    l_vis=axlVisibleGet()

    brd_layer = axlSubclasses("BOARD GEOMETRY" ?field 'userDefined)
    if((brd_layer != nil)
    foreach(subclass brd_layer
    axlClearSelSet()
    temp_Layer = sprintf(nil "BOARD GEOMETRY/%s" subclass)
    axlVisibleDesign(nil)
    axlVisibleLayer(temp_Layer t)
    axlVisibleUpdate(t)
    axlSetFindFilter(?enabled '(noall lines shapes figures text) ?onButtons '(noall lines shapes figures text))
    axlAddSelectAll()
    lyr_data = axlGetSelSet()
    axlClearSelSet()
    axlLayerCreateNonConductor(lyr_data)
    my_subclass = axlLayerGet(temp_Layer)
    axlLayerCreateNonConductor(my_subclass)
    ); foreach
    ) ;if

    axlVisibleSet(l_vis)
    axlVisibleUpdate(t)

    ); end procedure

    =============

    Ty.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • DavidJHutchins
    0 DavidJHutchins over 1 year ago in reply to EdwinB

    I think there are a couple of errors in your code, 1st issue is the following:

    lyr_data = axlGetSelSet()
    axlClearSelSet()
    axlLayerCreateNonConductor(lyr_data)

    You are getting the error since lyr_data is an empty list & the function wants a string value

    The 2nd issue is in the following code:

    my_subclass = axlLayerGet(temp_Layer)
    axlLayerCreateNonConductor(my_subclass)

    This will not work since my_subclass is just the subclass name & the function wants a string value containing the class & subclass values, below is from the doc:

    NEEDS
    t_layerName - <class>/<subclass>

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • EdwinB
    0 EdwinB over 1 year ago in reply to DavidJHutchins

    Hi Dave,

    Thank you for the feedback. This is an existing code, I thought I could use it. I guess not.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information