• 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. Exporting variants.lst through tcl or automation

Stats

  • State Verified Answer
  • Replies 9
  • Subscribers 13
  • Views 3820
  • Members are here 0
More Content

Exporting variants.lst through tcl or automation

PatEscher
PatEscher over 1 year ago

Hello, 

is there any way to export the variants.lst file through either tcl code, a command or any other utility, so that we can automate this process?
as of today, this has to be done manually through the Part Manager UI, and this is quite error prone as the users are missing this a lot and the variants.lst is either then not available or not up to date in Allegro

Thanks

Patrick

  • Sign in to reply
  • Cancel
Parents
  • Jeet
    0 Jeet over 1 year ago

    Try using following steps:

    1. Enable Journaling and Display Commands from Extended Preferences > Command Shell.
    2. Now, select and right click on the design file in the project manager and open Part Manager.
    3. Copy MenuCommand number from the command window and replace it in the below code in place of 14604 >

    set lSession $::DboSession_s_pDboSession
    DboSession -this $lSession
    set lNullObj NULL
    set lDesign [$lSession GetActiveDesign]
    if { $lDesign != $lNullObj} {
    MenuCommand "14604"
    Menu "Tools::Export Variant List"
    return
    }


    4. Run the TCL script in the command window and Hit Export it will create variants.lst file.

    Hope this helps!

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

    Hello Vishwajeet, 
    unfortunately this brings up the UI which requires a user input.

    I am looking for a full automation, so without User Input.
    is there a possibility to control the UI also through an xml file, like when switching to the variant view (even if controlling the UI is not really a good practice :)

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

    Hello, 

    Thank you for the code. Unfortunately it is not exactly what we need.
    dumping out the BOM's of the variants etc. is what we do already.

    We really look for a way to fully automate the export of the variant.lst file from Capture to Allegro PCB Editor so that the variant information is available in Allegro PCB.
    So we would need to have exactly the same syntax understood by allegro than when going through the the export Variant.LST in Part Manager

    Thanks

    Patrick

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Jeet
    +1 Jeet over 1 year ago in reply to PatEscher

    Try using the following TCL Code >

    set lSession $::DboSession_s_pDboSession
    DboSession -this $lSession
    set lNullObj NULL
    set lDesign [$lSession GetActiveDesign]
    if { $lDesign != $lNullObj} {
    MenuCommand "14604"
    SetAutomationFlag 1
    "ExportVariantList" C:/TCL1 C:/Cadence/SPB_23.1/tools/capture/
    SetAutomationFlag 0
    }


    Make sure the path variant.lst should have read/write permissions.
    "ExportVariantList" <path to dump variant.lst> <path to variant.cfg file>

    Let me know how it goes for you after performing the steps, are you able to generate variants.lst with tcl?

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • PatEscher
    0 PatEscher over 1 year ago in reply to Jeet

    perfect, that works like a charm with the design I tried.

    can you elaborate on what SetAutomationFlag does and is used for?

    +Patrick

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

    Great that it worked for you to generate variants.lst using TCL.
    SetAutomationFlag command is used to suppress the confirmation message or information message box.

    Hope this helps!

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

    Does this  work for all kind of boxes?
    Is it only for a box showing such a confirmation/information message or can it be used for other boxes,so saying that the 'OK' button is always pressed?

    +Patrick

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

    Does this  work for all kind of boxes?
    Is it only for a box showing such a confirmation/information message or can it be used for other boxes,so saying that the 'OK' button is always pressed?

    +Patrick

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
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