• 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 - TCL
  3. TCL Script System Capture get ALL Custom Var from Project...

Stats

  • State Suggested Answer
  • Replies 7
  • Answers 1
  • Subscribers 12
  • Views 263
  • Members are here 0
More Content

TCL Script System Capture get ALL Custom Var from Project and all from all Variants

PIPE
PIPE 4 days ago

Hello,

Sorry, i have search a lot but found nothing.

I must make some folders and my idea is to export via tcl all this information and with a exernal tool i read out this info and generate for every variant and master a sperate folder to but the bom etc inside.

Thanks for your help.

Peter

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

    @PIPE, Do you need command to read all custom variable and all variant name information?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • PIPE
    0 PIPE 4 days ago in reply to CadAP

    yes, and write them to a file

    Regards

    Peter

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • CadAP
    0 CadAP 4 days ago in reply to PIPE

    for getting all variant use command cps::getVariantNames -->dump varint name in list format

    for custom_var-> cps::getDirectives CUSTOMVAR --> Get list of all custom var in project.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • PIPE
    0 PIPE 3 days ago in reply to CadAP

    hello, thanks

    i have play now with them and found some stuff to export this. you point me in the right direction.

    but unfortinatly i dont found to read out the custom var from the variants.

    i have found a way to export the variant.dat and read out the CV values.

    my question is, can i read out this via tcl inside from system capture

    thanks

    Peter

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • PIPE
    0 PIPE 3 days ago in reply to CadAP

    hello, thanks

    i have play now with them and found some stuff to export this. you point me in the right direction.

    but unfortinatly i dont found to read out the custom var from the variants.

    i have found a way to export the variant.dat and read out the CV values.

    my question is, can i read out this via tcl inside from system capture

    thanks

    Peter

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • CadAP
    0 CadAP 3 days ago in reply to PIPE

     PIPE 

    for custom_var-> cps::getDirectives CUSTOMVAR --> Get list of all custom var in project.

    set lCustomVarlist [cps::getDirectives CUSTOMVAR ]

    foreach var $lCustomVarlist {

    set Val [ cps::getDirectiveValue CUSTOMVAR $var ]

    puts $Val

    }

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • PIPE
    0 PIPE 3 days ago in reply to CadAP

    hello,

    unfortinatly this works only for the customvar in the root not for variants

    Tcl> source c:/cadence/tcl/d.tcl

    GE

    <partno>

    <docno>

    <v>

    <date>

    <user>

    <title>

    BASE

    TAC290

    5865895SCH

    7

    P9

    7

    H

    in my variant i have change some customvar with the varianteditor

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • PIPE
    0 PIPE 3 days ago in reply to PIPE

    i have try this, but unfortinatly this prints a lot but no varinat customvars

    set filePath "c:/temp"
    set fileName "ProjectDetails.txt"
    set filePath1 [file join $filePath $fileName]
    set op [open $filePath1 "w+"]
    set sectionList [cps::getSections]
    foreach section $sectionList {
    set directiveList [cps::getDirectives $section]
    foreach directive $directiveList {
    set valueList [cps::getDirectiveValue $section $directive]
    set value1 [concat $section ":" $directive ":" $valueList]
    puts $op $value1
    }
    }
    close $op

    • 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