Discrete Cross-referencing on Large Schematic Symbols

  • Oh no! An error has occurred!
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • You need to be logged in to do that.
  • Coinciding with the acquisition of VIA Development, Nate joined Autodesk in March of 2003 after a decade stint as an entrepreneur following a two-decade stint as a controls engineer and software applications developer at Owens-Corning. Nate is now the lead product architect for AutoCAD Electrical. He loves this stuff.

    About Nate

Latest Post

  • Discrete Cross-referencing on Large Schematic Symbols
    February 9, 2007, 05:51 PM Nate Holt

    Some users want to show a reference-only representation of each child contact on the parent symbol and position its single piece of cross-reference annotation under it or near it. They want AutoCAD Electrical to then keep each one of these discrete cross-references up-to-date.

    The Desired Outcome...

    In the example parent relay symbol shown below, the vertically oriented text right below each reference-only contact representation points at the sheet and line reference location of where that child contact is actually found.

    discrete01.jpg

    ... But can't do it

    Out-of-the-box, AutoCAD Electrical cannot do this, that is, it is not designed to insert individual cross-reference values spread out across a large schematic parent symbol. The standard cross-referencing for a parent symbol's child contacts is going to be either comma-delimited attributed text or else presented in a table format.

    AutoCAD Electrical's API to the Rescue

    But where out-of-the-box features and options end, you can push the limits of AutoCAD Electrical to deal with your custom requirements. Here's one way to try to deal with the above... 1) We'll add some extra attributes to our large schematic relay symbols to display this discrete cross-reference information, and 2) We'll write a small external AutoLISP utility to process these modified symbols and update them with cross-reference information based upon child contact data pulled from the active project's scratch database.

    Modified Library Symbols

    Let's think about this. Let's say we have a relay coil symbol as shown above. Four contacts. Each with a unique pair of pin numbers. How can we map a child contact, let's say a contact inserted with pins 23,24, inserted on some drawing in our project, back to a parent and have it land the cross-reference annotation just below the graphics marked with pins 23 and 24?

    In our solution here, we're going to try to use groups of three related attributes for each contact reference. One attribute for the actual cross-reference annotation, and two attributes to carry the pin number assignments for the target contact. The three attributes are linked together by a common substring in the attribute tag names.

    Here's our schematic library symbol with the extra attributes:

    discrete02.jpg

    Here's the linking scheme. Look at the left-hand contact. The discrete cross-reference attribute name is XR_1 and the two pin number attributes are XRT1A and XRT1B. The fourth set of attributes is XR_4 and XRT4A, XRT4B. So, our scheme is to add attributes in groups of 3 using this naming convention. Note: in this example symbol, with download link below, the pin attributes are preset with default values and the symbol has a PINLIST attribute that is preset with the pin list info (so no catalog lookup is needed to make this thing work if you want to play with it).

    Our custom AutoLISP Cross-Referencing command

    We write our AutoLISP utility to look for these new attributes and intrepret the groupings based upon the naming convention we've set up above. Here's our proposed cross-referencing utility to operate on these special attribute groupings. Download here.

    Testing

    To test: 1) Insert instances of the parent symbol (the above sample is here), 2) insert child contacts here and there and relate back to the parent symbol. 3) Qsave your drawing and maybe freshen the project database to make sure that all child contact data is in place. 4) APPLOAD the attached AutoLISP utility and type CROSSREF_DISCRETE at the command line and press [Enter].

    How does this thing work?

    Open up the AutoLISP file with a text editor (or in the free Visual LISP editor that is built in to AutoCAD - type VLIDE at command line). If you scan down through the short program, you'll see a number of queries on the project's scratch database file. There is a query to get all of the "parent" symbols found on the active drawing (query on COMP table), a query to get all "child" symbols from all dwgs in the project (query on the COMP table again). Then it checks each parent on the active drawing for existence of an attribute that starts with the name "XR_". If a parent has that attribute, then the utility processes that symbol. It finds all child contacts with the same tag-ID value. Then for each child it does a query on the COMPPINS table to get that child's two pin number values.

    Now, with the above info, it scans the parent symbol and pushes the cross-reference annotation out to the appropriate XR_n attribute based upon the pin numbers found on the XRTnA and XRTnB attributes. Seems to work. Neat.





    1 Comment | Add Comment Controlling the Machine > All

Comments

  • September 2, 2008 05:02 PM Nigel Wallbridge

    Is there a way of creating a component that has many terminals with functions other than contacts i.e. analogue inputs and outputs that can be cross referenced Parent to Child? I understand how to do it with contacts NO & NC but I can't see a way of doing the same for other types of functions within the Parent I experimented by adding standalone refs to the block but they donot work when saved as a component. The only way I have found to partly acheive this is to add the standalone cross references to the block and save it as a"circuit" which can then be inserted with the references. This is not an ideal solutionas when the component is moved within the drawing the crossrefs have to be moved separately.



You must be logged in to post a comment.

Subscribe to Blog

Want to keep up with the latest? Subscribe to the RSS feed today.

RSS

Tags

You must be logged in to add a tag.

Send to a Peer

You must login to share pages.

Feedback

Tell us what you think of the site.

Send Feedback