• 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 System Capture (EE Cockpit)
  3. TCL/script to get the Custom variables variant specific...

Stats

  • State Verified Answer
  • Replies 10
  • Subscribers 29
  • Views 4276
  • Members are here 0
More Content

TCL/script to get the Custom variables variant specific Values and transfer to a customer variable?

MZ20250602835
MZ20250602835 4 months ago

Dear all,

may i ask how could i make a TCL/script in order to get the Custom variables variant specific Values for specific row(For example row3 DOC_PART_PCBA) and then give/transfer this value to a customer variables?

    

Many thanks

Moyan

  • Sign in to reply
  • Cancel

Top Replies

  • CadAP
    CadAP 4 months ago +1 verified
    MZ20250602835 Please try the script below, as it will update the custom variable value by reading from the variant. For the purpose of this example, I've taken the first value of the variable from…
  • CadAP
    0 CadAP 4 months ago in reply to MZ20250602835

    MZ20250602835 

    Retrieve the list of variants from the design using the function cps::getVariantNames, which returns the variant names in order, and store this list in a variable.

    Iterate to the foreach loop defined in the above code and retrieve the variable value 'data'.  Parse the variable by removing the prefix "CV_" and then match the resulting variant name against the list from above in order to obtain the corresponding property value.

    This will help you to achieve you requirement.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • MZ20250602835
    0 MZ20250602835 4 months ago in reply to CadAP

    Dear CadAP,

    many many thanks again, i modified the script within checkFuncVar in order to get CV_VAR_X at one time so it works independent of the order of the variants.

    happy Easter
    Many thanks
    Moyan
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • MZ20250602835
    0 MZ20250602835 3 months ago in reply to CadAP

    Dear CadAP,

    during test i have one issue, if the data content ~ and changed the row in this case i can`t get the value later for custom variable.

    CV_VAR_1='DOC_COMPPLAN_DESC=test|DOC_COMPPLAN_NO=2100-1000|DOC_COMPPLAN_VER=00|~
    DOC_PART_PCBA=5100-1000|DOC_PART_PCB_NUMBER=5100|DOC_PCBAPLAN_MOD_DATE=test_MOD_~
    DATE|DOC_PCBAPLAN_MOD_ENG=test MOD_ENG|DOC_PCBAPLAN_PROD_DATE=test_DATE|DOC_PCBA~
    PLAN_PROD_ENG=test_ENG';

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • CadAP
    0 CadAP 3 months ago in reply to MZ20250602835

    MZ20250602835 

    Please try to remove the "~" from the list "valuesOnlyList" where we are storing the dict  key and value. 

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • MZ20250602835
    0 MZ20250602835 3 months ago in reply to CadAP

    Many thanks again,

    the problem is solved.

    Best Regards

    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