AutoCAD Electrical Forum
Welcome to Autodesk’s AutoCAD Electrical Forums. Share your knowledge, ask questions, and explore popular AutoCAD Electrical topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Wire Labelling

5 REPLIES 5
Reply
Message 1 of 6
MReed
378 Views, 5 Replies

Wire Labelling

I'm trying to auto label my wires using a unique system (the device name as a wire name).
Does anyone know how to change the settings to do this automatically?
5 REPLIES 5
Message 2 of 6
rstein
in reply to: MReed

I understand what your question is, but I don't think it will work. How would AutoCAD Electrical know which device in the wire network would be the one to take the device name from. for example you could have 3 items in 1 wire network. how would it know to take one over the other. I will look into this tonight to see if i can find a work around for it.

Thanks
Rob Stein
Message 3 of 6
testsubject
in reply to: MReed

As far as I know, that is not possible to do automatically. The wiring module does not know which end to use for the Wire Number Prefix. You can force it to use a specific component by overriding the default settings and picking all the wires that are affected, but that is not automatic.


Sorry that I did not have the answer you were looking for.

Robert Hanrahan
Weight Right Automatic Scale Co.
ACE User since 1997


Bob Hanrahan
Ace User since 1998
If this answered your question, please click on "Accept Solution"
Message 4 of 6
MReed
in reply to: MReed

Thanks for your help, at least it's just not me that couldn't figure a way to do this. Have to convince everyone that is not a conventional method
Message 5 of 6
rstein
in reply to: MReed

I was unable to find any automatic work around at this point. you might be able to write a custom program using vb or lisp that will read the tag device name (tag1) from the device block and place that in as the wire number. but i think it would still be a matter of click the wire you want to number then clicking the device you want the wire to be named after. so it would not be 100% automatic.

Thanks
Rob Stein
Message 6 of 6
Anonymous
in reply to: MReed

Here is a sample AutoLisp utility that will generate a "fixed" wire number based upon the tag name and pin number of devices connected at each end of a wire segment. This only works for situations where there are two devices, though you could probably enhance it to build wire numbers where there were more than two connected devices. If you wanted to get fancy, you could make this utilty work "drawing wide" or even "project wide". To use: make sure AcadE is "awake". APPLOAD this utility. Type milnum [Enter] at command line to execute. (defun c:milnum ( / en ed x compconlst comp1_en comp2_en pin1 pin2 new_wireno netlst str comp1_tag comp2_tag xterm1_en xterm2_en) (while (setq x (entsel "\nSelect wire for special MIL wire number format:")) (setq en (car x)) (setq ed (entget en)) (if (= (cdr (assoc 0 ed)) "LINE") (progn ; okay to continue (if (setq netlst (c:wd_get_wire_netlst en 1)) (progn (setq compconlst (nth 9 netlst)) (cond ((= (length compconlst) 2) ; two connected components, okay to continue (setq comp1_en (car (car compconlst))) (setq comp2_en (car (cadr compconlst))) (setq xterm1_en (cadr (car compconlst))) (setq xterm2_en (cadr (cadr compconlst))) ; Get the suffix of the first component's X?TERMxx attrib (setq str (cdr (assoc 2 (entget xterm1_en)))) ; Get PIN number of first component (setq pin1 (c:wd_getattrval comp1_en (strcat "TERM" (substr str 7)))) (if (AND (not pin1) (c:wd_getattrval comp1_en "TAGSTRIP")) ; Terminal symbol, just grab the TERM01 terminal number (setq pin1 (c:wd_getattrval comp1_en "TERM01"))) ; Get the suffix of the 2nd component's X?TERMxx attrib (setq str (cdr (assoc 2 (entget xterm2_en)))) ; Get PIN number of first component (setq pin2 (c:wd_getattrval comp2_en (strcat "TERM" (substr str 7)))) (if (AND (not pin2) (c:wd_getattrval comp2_en "TAGSTRIP")) ; Terminal symbol, just grab the TERM01 terminal number (setq pin2 (c:wd_getattrval comp2_en "TERM01"))) ; Get tag of the two components (setq comp1_tag (c:wd_getattrval comp1_en "TAG1*,TAG2*,TAGSTRIP,TAG,TAG_*")) (setq comp2_tag (c:wd_getattrval comp2_en "TAG1*,TAG2*,TAGSTRIP,TAG,TAG_*")) (if (not comp1_tag)(setq comp1_tag "")) (if (not comp2_tag)(setq comp2_tag "")) (setq new_wireno comp1_tag) (if (AND pin1 (/= pin1 ""))(setq new_wireno (strcat new_wireno "-" pin1))) (setq new_wireno (strcat new_wireno "/" comp2_tag)) (if (AND pin2 (/= pin2 ""))(setq new_wireno (strcat new_wireno "-" pin2))) (c:wd_putwnf en new_wireno) ; put the wire number on wire ) (T (princ "\n other than two connected components\n")) ) ) ) ) ) ) (princ) ) "MReed" wrote in message news:15217154.1088689239570.JavaMail.jive@jiveforum2.autodesk.com... > Thanks for your help, at least it's just not me that couldn't figure a way to do this. Have to convince everyone that is not a conventional method

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost