• 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 PCB Editor
  3. Help copying shapes to another layer

Stats

  • Replies 4
  • Subscribers 159
  • Views 15650
  • Members are here 0
More Content

Help copying shapes to another layer

EvanShultz
EvanShultz over 15 years ago

 I want copy the PLACE_BOUND shapes of all symbols onto another layer. I haven't figured out how to do it but here's what I've tried:

 

 I first tried using z-copy as a "script" using axlShell in a foreach loop and running through all the components. I find the PLACE_BOUND shape for each symbol (the child in the following code) then used the zcopy command with a random vertex of the PLACE_BOUND shape as the select point. It would certainly seems to work to me, and I confirmed that the pick point is a vertex of the PLACE_BOUND shape.

axlShell(sprintf(nil "zcopy shape;setwindow form.mini;FORM mini class_name MANUFACTURING;FORM mini subclass_name %s;setwindow pcb;pick %g %g;done" layer caar(car(child->segments)->startEnd) cadar(car(child->segments)->startEnd)))

But this doesn't work and I see:

E- Form field label not found
E- No command active

in the Command Window a bunch of times followed by:

Select cline, shape, rectangle or closed polygon.
Enter selection point

in the Command Window once at the end and Allegro is still in "zcopy shape" mode. The commands are from a script I generated, but apparently the pick point isn't being accepted?? I believe that's the point in the command sequence that would leave me at the final Command Window message.

BTW, can I execute a series of commands in an axlShell call without briefly popping open forms?

 

 I then decided to make a generic box with:

axlDBCreateRectangle(child->bBox t strcat("MANUFACTURING/" layer) nil child->parent)

This works. I get a rectangle on the desired layer, which is attached to the symbol, and is the same size as the extents of the PLACE_BOUND shape (still the "child"). This is fine, I suppose, but I'm not satisfied.

 

 I really would like a shape that is round if the PLACE_BOUND shape is round, oblong if the PLACE_BOUND shape is oblong, etc. It appears I might be able to create the path using the segments of the PLACE_BOUND shape. I would to use axlPathStart for the first shape vertex, regardless of segment type, and then use axlPathLine or axlPathArcCenter (depending on if the segment is a line or arc) to replicate the path for the new shape. Since the endpoints of the arcs and lines making up the PLACE_BOUND shape appear to be "in order" I believe it would work if I build the new shape path in the order that I extract the path from the PLACE_BOUND shape. But it's certainly complicated and the code I've written isn't even working.

 

I'd like to think I'm making this too hard. Is there a better way to copy a shape to another subclass inside a SKILL program? Can I more easily extract the path from a PLACE_BOUND shape and feed that directly into a new shape creation function?

  • Sign in to reply
  • Cancel
  • aCraig
    aCraig over 15 years ago

    Try;

    poly = car(axlPolyFromDB( o_shape))

    shape = axlDBCreateShape(poly r_fill t_layer nil nil)

     -Craig

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • EvanShultz
    EvanShultz over 15 years ago

     Hi Craig,

    Thank you! I haven't used the polygon functions before but I just thought there had to be a better way than what I was trying. I see in hindsight that I could have searched algroskill.pdf for "r_path" and found these functions.

    I'll try this when I get a chance and report back if I have any problems.

     

    For my reference, is there a way to suppress forms from flashing opening when blasting serveral commands to Allegro using axlShell?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • aCraig
    aCraig over 15 years ago

    Use scriptmode. You can search for the use model in the Cadence help.

    But use this at the begining

    scriptmode +i

    and this at the end

    scriptmode -i

    of your script.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • EvanShultz
    EvanShultz over 15 years ago

     Thank you Craig. I use this command inside scripts, where it works well, but it doesn't work when I'm sending multiple commands at Allegro using axlShell (see the first code example in my first post). I still see forms flash open with:

    axlShell("scriptmode +i +n;....")

     

    Or else I'm doing something wrong, which is entirely possible.

    • 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