Creating Special Wire From/To Annotation - AutoCAD Electrical

  • 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.
  • 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

  • Creating Special Wire From/To Annotation - AutoCAD Electrical
    February 21, 2007, 07:45 PM Nate Holt

    This was an interesting request originating from the gas/oil industry. The user wanted the control schematics to be annotated with individual from and to tags. For example, let's say a pushbutton is shown wired to a motor starter coil and then jumpered down to a pilot light. The "wire tag" of the wire end at the pushbutton would show the tag-ID and pin number of the motor starter coil. The same for the jumpered pilot light. The motor start coil's pin would be tagged with both the pushbutton and the pilot light since is is common to both.

    Example: BEFORE

    fromto01.jpg

    AFTER

    fromto02a.jpg

    AutoCAD Electrical API to the Rescue (again)

    Well, out-of-the box, AutoCAD Electrical is not set up to annotate the schematics this way. It has the data and can REPORT these connections this way. But it is not set up to actually INSERT pieces of "smart" from/to text right on each connection of the schematics.

    What we want is this:
    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 off (i.e. layer "frozen").

    Here is a small AutoLisp utility that is roughed out to provide the above. 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.

    How it works

    Key snippets of the utility are shown below.

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

    fromto04.jpg

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

    fromto05.jpg

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

    fromto06.jpg

    Step 4: Insert TEXT entity with the formatted text.

    fromto08.jpg

    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.

    fromto09.jpg

    How can I make this Cooler?

    fromto10.jpg


    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!




    0 Comment | Add Comment Controlling the Machine > All

Comments



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