Home
  • Products
  • Solutions
  • Support
  • Company

This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  • Products
  • Solutions
  • Support
  • Company
Community PCB Design & IC Packaging (Allegro X) Allegro X Scripting - TCL Change Variant View using TCL

Stats

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

Change Variant View using TCL

akehlenbeck
akehlenbeck over 2 years ago

Is there a way to use a TCL script to change which Variant is currently being viewed?

i.e. is there a TCL way to mimic "Shift+M, then selecting a different Variant"?

  • Sign in to reply
  • Cancel
Parents
  • AyushD
    0 AyushD over 2 years ago

    If you are looking for switching variant view mode using TCL, try using below command

    Menu "View::Variant View Mode" | DialogBox "OK"

    After the "OK" a path to xml file has to be provided which lists the variant to be displayed

    For e.g. Menu "View::Variant View Mode" | DialogBox "OK" "C:/tmp/CAPTURELOG/Mon_May__2_11_35_26_2022/Select a Design Variant_1.xml"

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Krissn
    0 Krissn 10 months ago in reply to AyushD

    but .xml has a fixed variant names. So if you load another design this will not work as variants has different names!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • Krissn
    0 Krissn 10 months ago in reply to AyushD

    but .xml has a fixed variant names. So if you load another design this will not work as variants has different names!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • CadAP
    0 CadAP 10 months ago in reply to Krissn

    HI Krissn,

    You can use the below code to switch to variant mode.

    Please source the below code and open the design and type below command(after sourcing the tcl code)

    displayVariant {Variantname} 

    For example you have variant name test1 type like below:

    displayVariant {test1} 

    After successful running of code, test1 variant mode will be activated.

    proc displayVariant {Variantname} {
    set tempfile [open "temp.xml" w+]

    puts $tempfile {<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <DialogControls>
    <Control Type="LIST_BOX" Enable="TRUE" Visible="TRUE" Id="1265">}
    puts $tempfile " <Value><!\[CDATA\[$Variantname\]\]></Value>"
    puts $tempfile { <Value><![CDATA[<Core Design>]]></Value>
    <Value><![CDATA[TB1]]></Value>
    <Value><![CDATA[TB2]]></Value>
    </Control>
    <Control Type="PUSH_BUTTON" Enable="TRUE" Visible="TRUE" Id="1">
    <Value><![CDATA[OK]]></Value>
    </Control>
    <Control Type="PUSH_BUTTON" Enable="TRUE" Visible="TRUE" Id="2">
    <Value><![CDATA[Cancel]]></Value>
    </Control>
    <Control Type="PUSH_BUTTON" Enable="TRUE" Visible="TRUE" Id="57670">
    <Value><![CDATA[Help]]></Value>
    </Control>
    </DialogControls>}

    close $tempfile

    Menu "View::Variant View Mode" | DialogBox "OK" "[pwd]/temp.xml"

    catch {file delete "temp.xml"}

    }

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • PatEscher
    0 PatEscher 10 months ago in reply to CadAP

    what is the MenuCommand for "View::Variant View Mode". we will run in different UI languages, so I am wondering if it would work when e.g. running in Chinese UI using "View::Variant View Mode"

    • 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