• 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. Skill to open Custom Variables Window in Allegro x 25.1...

Stats

  • State Suggested Answer
  • Replies 4
  • Answers 1
  • Subscribers 22
  • Views 312
  • Members are here 0
More Content

Skill to open Custom Variables Window in Allegro x 25.1 PCB Editor

MZ20250602835
MZ20250602835 6 days ago

Dear all,


i can use Command tbx customvar update to open the custom variables window.

I can also use axlShell("tbx customvar update") to open the same window but My current Problem is that:

after giving axlShell("tbx customvar update") I do not get the Skill > for the next skill 

Skill > axlShell("tbx customvar update")

Reading file "C:/Users/emp8124501/ECAD/projects/251_demo/output/251_demo/physical/customvar.cfg"

Info: Reading custom variables from "C:/Users/emp8124501/ECAD/projects/251_demo/251_demo.cpm"

It missing the Skill > after Info: Reading custom variables from "C:/Users/emp8124501/ECAD/projects/251_demo/251_demo.cpm"

May i ask how could i solve this issue or are there any other skill to use instead of axlShell in allegro x pcb editor such as axlCmd, axlUIWExecuteCommand or axlDBCmd?

Many thanks

Moyan

  • Sign in to reply
  • Cancel
Parents
  • andakConsultingLtd
    0 andakConsultingLtd 4 days ago

    Hi Moyan,

    See if you can use this (untested) code for your app:

    ; ---------------------------------------------------------------------------
    ; 1. DEFINE the property in the design's property dictionary (one-time setup)
    ;    axlDBCreatePropDictEntry(name dataType objTypes valRange units constraint)
    ;    Only needs to run once per design -- guard it so re-running doesn't error.
    ; ---------------------------------------------------------------------------
    procedure( myskill_ensureProps()
        unless( axlDBGetPropDictEntry("MY_TEMP")
            axlDBCreatePropDictEntry("MY_TEMP" "REAL" list("pins") list(nil nil) "C" nil)
        )
    )

    ; ---------------------------------------------------------------------------
    ; 2. WRITE the property onto a specific object
    ;    axlDBAddProp(dbid list(propName propValue))
    ; ---------------------------------------------------------------------------
    procedure( myskill_setTemp(pin tempVal)
        myskill_ensureProps()
        unless( errset( axlDBAddProp(pin list("MY_TEMP" tempVal)) )
            error("myskill" "axlDBAddProp failed for MY_TEMP=%g on %s.%s"
                  tempVal (or pin->parent->refdes "?") (or pin->number "?"))
        )
        printf("INFO myskill: MY_TEMP = %g set on %s.%s\n"
               tempVal (or pin->parent->refdes "?") (or pin->number "?"))
    )

    ; ---------------------------------------------------------------------------
    ; 3. READ the property back off the object
    ;    axlDBGetProperties(dbid '("user")) returns a list of (name value) pairs
    ; ---------------------------------------------------------------------------
    procedure( myskill_getPropValue(propName propList)
        let( (result targetStr)
            result    = nil
            targetStr = upperCase(propName)
            foreach( entry propList
                when( upperCase(sprintf(nil "%s" car(entry))) == targetStr
                    result = cadr(entry)
                )
            )
            result
        )
    )

    procedure( myskill_getTemp(pin)
        let( (props strVal result)
            props  = axlDBGetProperties(pin '("user"))
            strVal = myskill_getPropValue("MY_TEMP" props)
            result = if( strVal != nil then atof(sprintf(nil "%s" strVal)) else nil )
            result
        )
    )

    ; ---------------------------------------------------------------------------
    ; 4. (optional) REMOVE the property from an object
    ;    axlDBDeleteProp(dbid propName)
    ; ---------------------------------------------------------------------------
    procedure( myskill_clearTemp(pin)
        unless( errset( axlDBDeleteProp(pin "MY_TEMP") )
            error("myskill" "axlDBDeleteProp failed for MY_TEMP on %s.%s"
                  (or pin->parent->refdes "?") (or pin->number "?"))
        )
    )

    ; ---------------------------------------------------------------------------
    ; Example usage
    ; ---------------------------------------------------------------------------
    let( (pin)
        pin = car(axlDBGetPointList(nil "Select a pin: " '("Pin")))->objType  ; placeholder for pin selection
        myskill_setTemp(pin 85.0)      ; write MY_TEMP = 85.0 on the pin
        printf("MY_TEMP readback = %g\n" myskill_getTemp(pin))  ; read it back
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • MZ20250602835
    0 MZ20250602835 4 days ago in reply to andakConsultingLtd

    Many thanks for your reply, but i think this is not the skill i need.

    Best Regards

    Moyan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • andakConsultingLtd
    0 andakConsultingLtd 4 days ago in reply to MZ20250602835

    Well, this shows you how to deal with custom properties and properties in general. What's missing?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • andakConsultingLtd
    0 andakConsultingLtd 4 days ago in reply to MZ20250602835

    Well, this shows you how to deal with custom properties and properties in general. What's missing?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • MZ20250602835
    0 MZ20250602835 4 days ago in reply to andakConsultingLtd

    I want to have the skill to update the value of custom variables.

    The commands i post above To update custom variables in Cadence PCB / Allegro using the Toolbox (tbx) utility, open the setup menu, select custom variables, and run the update command to input new values like dates or revisions, then run it again to refresh the drawing.

    I would like to have the same function with using skill instead of commands.

    I am still learning your code, but as far as i understand the code you post is for another function.

    Many thanks again

    Moyan

    • 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.

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

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