- Oh no! An error has occurred!
- 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.
-
Flipping Form-C Contact Pin Assignments - AutoCAD Electrical
February 18, 2009, 10:14 AM Nate HoltThis issue seems to pop up when creating a form-C contact arrangement out of two separate N.O. / N.C. relay contact symbols from one of the JIC libraries. The pin assignment can come in reversed from what is expected. In this example, pin 12 is the "common" pin of the form-c contact arrangement. But the N.C. contact received the "12" assignment on the right-hand TERM02 attribute instead of the left-hand TERM01 attribute.

Here's a little clean-up utility that may help clean up these two-contact combos. Download here and rename it to form_c_pins.lsp.
files/24401_24500/24491/file_24491.lsp
To use, make sure the project is active and the target drawing is displayed. "APPLOAD" the "form_c_pins.lsp" file and then type this at your "Command:" prompt:
FORM_C_PINS [Enter]
What this little AutoLISP program does is query the project's scratch database PINLIST table to gather up all pin list information for all parent components found in the project. Then it scans through the child contacts on the active drawing. For each child that matches up with a parent found in the PINLIST table, it confirms that the child contact's TERM01 gets the "common" pin assignment for the form-C pair. Note: if the contact carries attribute COMMON with a value of "02", then TERM02 will be treated as the "common" pin of the contact.
Right now, this utility processes all contacts on the active drawing. If you want to adjust the program to be more selective, open up form_c_pins.lsp with an ASCII text editor or with the built-in Visual Lisp editor in AutoCAD. Find this highlighted line in the file:
(if formc_lst
(progn ; have some Form-C data from the project scratch database table PINLIST.
; OK to process dwg, look for contacts with CONTACT attribute, check
; for match on the form-C tags.
(setq ss (ssget "_X" '((0 . "INSERT"))))
(if (/= ss nil)
(progn
(setq slen (sslength ss))Change it to this...
(setq ss (ssget '((0 . "INSERT"))))
...and save the file and re-APPLOAD it. Now it will only process the contacts that you select.
You must be logged in to post a comment.