• 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 access user preferences via SKILL?

Stats

  • Replies 8
  • Subscribers 17
  • Views 12628
  • Members are here 0
More Content

How to access user preferences via SKILL?

EvanShultz
EvanShultz over 6 years ago

I found article 20482607 in COS (https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1O0V000009ET07UAG), titled "How to customize the User Preferences Editor with custom variables".

This seems to work fine and the customizations show up in the UI, but I haven't figured out how to access those new user prefs (or any user pref, for that matter) in my SKILL programs. axlDBGetDesign() doesn't seem to have any property that helps me and I don't get any hits with a bunch of search terms in algroskill.pdf. Nor does searching this forum or online help. They also aren't shown when running "set" in the Command window (though many user prefs aren't there so I'm not concerned).

Can anybody show me how to access user prefs, especially custom ones, via SKILL?

As a related aside, is there any way to set a default value for a custom user pref? With a checkbox the wording of the pref could be inverted to make unchecked the desired default state, but with a STRING or ENUM how can I set the default value?

  • Cancel
  • Sign in to reply
Parents
  • eDave
    eDave over 6 years ago

    Use axlGetVariable to read the value and use axlSetVariable (possibly in you allegro.ilinit file) to set the values.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 6 years ago in reply to eDave

    or use the DEFAULT field to set the default value

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • EvanShultz
    EvanShultz over 6 years ago in reply to eDave

    Thanks Dave! That works to get the user pref. Now I find I've done this before but I didn't know where to look earlier...

    So using the example from COS, along with your suggestion above, I might think editing one line to variable1:TYPE=STRING:DEFAULT=10:EFF_ONRESTART:\ would work. But I tried that and a few variations without success. What am I doing wrong? (Setting it in allegro.ilinit would surely work, and I could check for an existing value, but this seems even easier and doesn't have any startup time impact so I'd like to at least try it out.)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 6 years ago in reply to EvanShultz

    I hadn't tried using a default value before now and I see the same lack of effect. Indeed I don't see the"defaults" button that's referenced in the user.prf document so I suspect this may be a legacy feature. I can see why it wouldn't work because the settings GUI is really just an interface to the variables.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • eDave
    eDave over 6 years ago in reply to EvanShultz

    I hadn't tried using a default value before now and I see the same lack of effect. Indeed I don't see the"defaults" button that's referenced in the user.prf document so I suspect this may be a legacy feature. I can see why it wouldn't work because the settings GUI is really just an interface to the variables.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • EvanShultz
    EvanShultz over 6 years ago in reply to eDave

    Thanks for the confirmation.

    I assume there is some way to set a default value. Check out Display/Roam/roaminc. The help says the default is 96 pixels and "96" is in the textbox. Display/Align Guides/Ratsnest is checked by default and the help says "Setting will be On by default". I don't see any pulldowns with a default value but perhaps I'm just missing it. Anyway, a textbox value is what I'm looking for now.

    Will submit a case on COS to ask about this.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • EvanShultz
    EvanShultz over 6 years ago in reply to EvanShultz

    "$CDSROOT\share\pcb\configure\prfedit\display.prf" shows usage of DEFAULT which seems to work for the included prefs, but isn't working for me.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 6 years ago in reply to EvanShultz

    Note that roam.prf doesn't contain a default for roaminc. It is set in the share\pcb\env file

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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