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: 

Relay Contact Descriptions

4 REPLIES 4
Reply
Message 1 of 5
rvargas
531 Views, 4 Replies

Relay Contact Descriptions

I have assign a contact description (say: to trip ckt. 1) in the pinlist along with the contact number. Now I like to show the description next to the graphical representation of the contact using the "cross-reference graphical representation feature. Any ideas?

Robert.
4 REPLIES 4
Message 2 of 5
testsubject
in reply to: rvargas

Go to Projects/Miscellaneos and check the "Display cross-referencing in graphical format." Go back to the drawing and re-run Cross-referencing. This should update the coils. The contacts have no graphical format.

Robert Hanrahan
Weigh Right Automatic Scale Co.
ACE user since 1998


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

Robert,

That's exactly what i'm doing. The problem is that instead of just having the drawing, sheet or location description, i would like to have more information like for example to what circuit that contact is connected. please see the attached file for details.
-Robert
Message 4 of 5
Anonymous
in reply to: rvargas

AcadE is not currently set up to pull the PINLIST "comments" and add them to the cross-reference text. The only way that I can think of doing this would be to use the AcadE user programming "API" and write a VB or AutoLisp program to postprocess the cross-ref text and add in the comments. This would not be super easy, but an outline of a program to do it is shown below. The hard part is to parse the Mtext text and paste in the comments. The program shown below only has the "easy" part in place. If you like to tinker with programming, give it a shot and see if you can make it work. Cut and paste to a file called "add_pinlist_comments.lsp". APPLOAD it. Type add_pinlist_comments at command line to run it. (defun c:add_pinlist_comments ( / pins_lst lst_main with_comments xdata ss mtext_entname ix) (princ "\nSelect cross-ref MTEXT entities to process") (setq ss (ssget '((0 . "MTEXT")))) ; prompt user to select Mtext objects (if (/= ss nil) (progn (setq slen (sslength ss)) ; number of Mtext entities selected (setq ix 0) ; set counter index to 0 (while (< ix slen) ; "while" loop to process all Mtext ents in selection set (setq mtext_entname (ssname ss ix)) ; get next Mtext ent from selection set (setq ix (1+ ix)) ; increment pointer for next time ; Look for Xdata point on this MText entity pointing back at its parent component (setq xdata (assoc -3 (entget mtext_entname (list "VIA_WD_XREF_BLOCK")))) (if xdata (progn ; target pointer data present on this MText entity. Dig it out (not pretty). (setq coil_hdl (cdr (assoc 1005 (cdr (car (cdr xdata)))))) ; Okay, have "handle" of this Mtext cross-ref's component block insert. Grab ; a copy of the pinlist data that is carried on it. (setq pinlist_data (c:wd_get_1000_xdata (handent coil_hdl) "VIA_WD_PINLIST")) ; Now break apart the pinlist_data. First break up at the ";" semicolons (setq lst_main (c:wd_delim_str_to_lst pinlist_data ";")) ; Now process each pin list pair and look for the "*" flag (setq with_comments nil) (foreach pinpair lst_main (setq pins_lst (c:wd_delim_str_to_lst pinpair ",")) (if (= (length pins_lst) 4) (progn ; 4 entries (ex: "1,P1,P2,*Aux N.O. contact" ; Check 4th for "*" char in first char position (if (= (substr (nth 3 pins_lst) 1 1) "*") (progn ; YES! Found pin pair with comment. Save it. (setq with_comments (cons pins_lst with_comments)) ) ) ) ) ) (if with_comments (progn ; at least one pin pair has a comment, continue to process (setq with_comments (reverse with_comments)) (princ "\nThe following pin combos have comments:") (foreach pinpair with_comments (princ "\n") (princ "1st pin=") (princ (nth 1 pinpair)) (princ " 2nd pin=") (princ (nth 2 pinpair)) (princ " comment=") (princ (nth 3 pinpair)) ) ; Get a copy of the Mtext entity data (setq mtext_entdata (entget mtext_entname)) ; Separate out the TEXT part of it (setq old_text_str "") (setq newed nil) (foreach rec mtext_entdata (if (OR (= (car rec) 3) (= (car rec) 1)) (progn (setq old_text_str (strcat old_text_str (cdr rec))) ) ; ELSE (setq newed (cons rec newed)) ) ) (princ "\nold text=") (princ old_text_str) ; ** the hard part goes here ** ; Now have to parse this Mtext string, find the contacts, match ; with the ones in "with_comments", paste the comment into the right ; spot in the old text string, and then update the Mtext entity ; with this new text string. (setq new_text_str (strcat old_text_str " (this is a test)")) ; test only ; ** end of hard part ** ; Write new text string back out to Mtext entity (setq newed (reverse (cons (cons 3 new_text_str) newed))) (entmod newed) ) ) ) ) ) ) ) (princ) ) "rvargas@rayae.com" <nospam@address.withheld> wrote in message news:5426469.1092689301541.JavaMail.jive@jiveforum1.autodesk.com... > Robert, > > That's exactly what i'm doing. The problem is that instead of just having the drawing, sheet or location description, i would like to have more information like for example to what circuit that contact is connected. please see the attached file for details. > -Robert<nospam@address.withheld> wrote in message news:5426469.1092689301541.JavaMail.jive@jiveforum1.autodesk.com... > Robert, > > That's exactly what i'm doing. The problem is that instead of just having the drawing, sheet or location description, i would like to have more information like for example to what circuit that contact is connected. please see the attached file for details. > -Robert
Message 5 of 5
nguyenphuc
in reply to: Anonymous

Hi, Nate Holt

I have just read your comment about relay contact description by Autolisp program.

This is very useful macro, so, if available, please kindly send to me the "add_pinlist_comments.lsp" file.

My email: nghi.cas@gmail.com

Wait information from you.

Thank and best regards.

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

Post to forums  

Autodesk Design & Make Report

”Boost