Wednesday, February 6, 2013

AutoCAD Electrical - Wire From/To Annotation On the Schematic

I have used this twice in the past. It's not quite what the customer wanted but its close. I think with a little tweaking it could be perfect.

AutoCAD Electrical is not set up to show From/To tags on the schematic. All the info is there but only available in reports. But it is not set up to actually INSERT pieces of "smart" from/to text right on each connection of the schematics.

Here is a small AutoLisp utility created by Nate Holt. If you want to give it a try, download the file, APPLOAD it, and type OTHER_END [Enter] at your command line. The active drawing should update.

And here is what it does:
   1. Insert the annotation at the wire connection points, justify and rotate to follow the connected wire.
   2. Annotation to follow the same as a from/to report taking into account any special "wire sequencing" overrides or source/destination arrow connections.
   3. Text can be manually repositioned.
   4. Text will be "smart" in that it can be updated if connections changed - even if the text is moved.
   5. Text put on its own layer so it can be turned on and off.

Here are the before and after screen grabs. The tag-ID and pin number for the opposite end of each wires connection point. Note that CR408 shows multiple connections on both sides.

      image             image

I originally pulled this from Nate Holt's Autodesk blog. However that old link (from 2007) now goes to an Inventor blog. I have tested this lisp file using 2013 and it still works like a charm. The following is text and images are, from my notes, from the original blog post...

How it works

Key snippets of the utility are shown below.

Step 1: Extract all wire from/to connection data for the active drawing.

clip_image001

Step 2: Create a selection set of all block insert instances found on active drawing.

clip_image002

Step 3: Loop through the selection set, find schematic "components" blocks with wire connections. Format the connection information into a short string of text.

clip_image003

Step 4: Insert TEXT entity with the formatted text.

clip_image004

Step 5: Flip the new text entity to the target layer. Then insert an Xdata pointer on the wire connection point that points back at this new TEXT entity.

clip_image005

How can I make this Cooler?

clip_image006

Don't be afraid to modify this utility to fit your wants/needs. For example, you might want it to insert multi-line MTEXT instead of a single line TEXT entity. Maybe you'd rather have it insert a "LEADER" entity. How about adding more info to the text, like wire type or include the INST/LOC values in the tag for IEC drawings? Use your imagination... go for it!

6 comments:

  1. Hello
    Great tip,
    Is it possible to modify the wire numbers?
    I want the wire number to be associated to the tag of a block which is connected to.
    Thanks

    ReplyDelete
    Replies
    1. I’ve been asked for something like this several times. Out of the box the answer is no. I’ll have to think about how this one. Maybe a script that runs after the wire numbers are in place.

      Delete
  2. Dotes it run un 2015 versiĆ³n?

    ReplyDelete
  3. hi mate,
    do you know how to change this to give the connection pin Number instead of from/to?

    ReplyDelete
  4. Hi there, this is awesome. But I am wondering if you know how to change the code so there is a single tag centered to the line and have both references separated by a '/' slash and use a dash instead. It will look like "CR406-K1/X-111" for example. Thank you!

    ReplyDelete
  5. can someone upload a video on how to do this? :( i'm really confused. i'll appreciate your help.

    ReplyDelete

Note: Only a member of this blog may post a comment.