• 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. X-out on assembly variants

Stats

  • Replies 9
  • Subscribers 17
  • Views 11303
  • Members are here 0
More Content

X-out on assembly variants

VECTORT
VECTORT over 7 years ago

Hi,

I know that there is an option Manufacture > Variants > Create Assembly Drawing...

but this option makes unpopulated components to disappear, and this is not suitable for documentation for our manufacturing facility.

I know how to go in SKILL through all variants in Variant.lst.

One thing I need is how to draw in skill X of the size of assembly rectangle of the component on certain layer.

Thank you in advance for any tip.

  • Cancel
  • Sign in to reply
Parents
  • eDave
    eDave over 7 years ago

    Something like this:

    defun( DE_VariantAssemblyDraw (variantSymbols, topLayer, bottomLayer)
    foreach(sym, variantSymbols
    bBox = nil
    objs = setof(obj, sym ->children, memv(obj ->objType, '("path", "shape", "polygon")) && obj ->layer == strcat("PACKAGE GEOMETRY/ASSEMBLY_", if(sym ->isMirrored, "BOTTOM", "TOP")))
    foreach(obj, objs
    bBox = if(bBox
    then list(list(min(caar(bBox), caar(obj ->bBox)), min(cadar(bBox), cadar(obj ->bBox))), list(max(caadr(bBox), caadr(obj ->bBox)), min(cadadr(bBox), cadadr(obj ->bBox))))
    else obj ->bBox
    )
    newObj = car(axlDBCreateRectangle(bBox, nil, if(sym ->isMirrored, bottomLayer, topLayer), nil, sym))
    )
    )
    )

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • VECTORT
    VECTORT over 7 years ago in reply to eDave

    Thank you eDave.

    I have one more question:
    How I can print dbid attributes ?
    I found in forum that I can use dbid->?? and it will return all the attributes, 

    but when I try:
    printf(my_form "some_value: %s", dbid->??)

    I keep getting error that second argument is nil

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Kirti Sikri
    Kirti Sikri over 7 years ago in reply to VECTORT

    Instead of %s use %L.

    printf(my_form "some_value: %L", dbid->??)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • VECTORT
    VECTORT over 7 years ago in reply to Kirti Sikri

    No change, this is what I try to do:

    axlClearSelSet()
    axlSetFindFilter(?enabled '(components) ?onButtons '(components))
    result=axlGetSelSet(axlSingleSelectName("COMPONENT" strcat("U10000")))
    printf("Result: %L\n", result->??)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • VECTORT
    VECTORT over 7 years ago in reply to Kirti Sikri

    No change, this is what I try to do:

    axlClearSelSet()
    axlSetFindFilter(?enabled '(components) ?onButtons '(components))
    result=axlGetSelSet(axlSingleSelectName("COMPONENT" strcat("U10000")))
    printf("Result: %L\n", result->??)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • eDave
    eDave over 7 years ago in reply to VECTORT

    axlGetSelSet returns a list.

    Use result=car(axlGetSelSet(axlSingleSelectName("COMPONENT" strcat("U10000"))))

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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