Me again! ;-)
When inserting Terminals via the Circuit Builder, has anyone been able to associate the Multilevel terminals? I have 3 terminals in the circuit that are Top, Middle, and Bottom and it would be great if I could automatically associate them.
Thanks in advance!
I don't know of a documented way to do this. Are the terminals part of a tempplate that gets inserted and already has the other terminal properties preassigned? The LINKTERM value must be unique for each terminal group. That would be the tricky part. Do your terminals carry the LINKTERM as an attribute? AcadE supports either attribute or xdata of rthis value.
Let me think about this and if I come up with something I will post it here.
Does the LINKTERM value get auto-generatred each time a terminal group is associated? If so, I am unsure of how to automate this. I may have to do the association after the circuit is installed.
Thanks for the info.
as long as the terminals come in with the multi-level values already defined I did figure out a way to get the LINKTERM values assigned appropriately by Circuit Builder.
I combined a couple of methods documented in the Help under the Advanced Productivity - Customize Circuit Builder - How to section.
This requires editing the spreadsheet. You need to have a basic understanding of how the spreadsheet works so you can find the correct line to edit. In my test I edited the 3ph_H worksheet which corresponds to the 3ph Motor Horizontal non-reversing. The X001 code is for the motor terminals. If you look in the UI_PROMPT_LIST column you can see the options for motor terminals. For me it was Square, Round, None. I used the Square option for my test and changed the values in its COMMAND_LIST field.
It started out as -
(c:ace_cb_multipole #xyz nil "HT0001" 3 #scl 4 nil)
I changed it to -
(c:ace_cb_multipole #xyz nil "HT0001" 3 #scl 4 "_L=|LINKTERM=(setq #linkterm (ace_generate_new_assoc_id))|LINKTERM=(eval #linkterm)|LINKTERM=(eval #linkterm)"
So the text I show in red is what I changed.
I used a lisp call to get a unique ID for the LINKTERM. (This is an internal call and not a published API call but it should work ok.) I assign it to a variable, then I use that variable on all 3 terminals.
Of course this should only be done if the terminals are actually predefined as multi-level. You never want to have terminals with the same LINKTERM values unless they have the other necessary xdata values for multi-level. But it sounded like from your original post that your terminals are defined as 3-level already you just needed a way to associate them.
Hope this helps. Circuit Builder can be a little intimidating but it is pretty powerful once you understand the templates and spreadsheet.
Thanks for the info.
You are right in that Circuit Builder can be pretty scary! ;-)
I have a question about using the mulitpole API. My terminal are located at different locations in the schematic, not next to each other like in the circuit you used for your example. WIll this still work if I have each terminal at what essentially is the points of a triangle relative to each other?
I named my terminal marker blocks XT001, XT002, and XT003 so that I could give each one a different terminal number on insert.
This is the COMMAND_LIST code I am using.
(C:ace_cb_insym #xyz nil "VT0002" #scl 8 nil)(C:ace_cb_attr "TERM01" "1" nil nil)
Now it sounds like I should insert the terminal itself instead of a marker block. Is that what you are suggesting? Also, do I need to add LINKTERM to the terminal symbol (i.e., VT002.dwg)?
Another thing, is there somewher that tells of the different arguments that are available, i.e., _TAGFMT? I tried searching for this and could not find it.
Thanks for all the help.
The same general idea can work if not inserting using the multipole. So for the XT001 in the COMMAND_LIST you might have something like (I didn't actually try this method so if it doesn't work let me know and I will set up a test at my end) -
(C:ace_cb_insym #xyz nil "VT0002" #scl 8 "TERM01=1;LINKTERM=(setq #linkterm (ace_generate_new_assoc_id))")
For the XT002 terminal -
(C:ace_cb_insym #xyz nil "VT0002" #scl 8 "TERM01=2;LINKTERM=(eval #linkterm)")
For the XT003 terminal -
(C:ace_cb_insym #xyz nil "VT0002" #scl 8 "TERM01=3;LINKTERM=(eval #linkterm)")
I think if you want to assign these different values during the building of the circuit then I would put a marker block at each location that will get a terminal. Even if they are always inserted they can be done this way. You can have them in the spreadsheet even if you don't want them to show up on the dialog with options to select. Just don't put anything in the UI_* columns for that code. Then when the circuit is built that terminal will always be inserted.
Yes, the LINKTERM attribute must be present on the terminal block library symbol for this to work.
Look at the topic - "Circuit Builder drawing templates" to see a list of the various predefined values that can be used to assign attributes. The topic shows the values that can be used on the marker blocks in the MISC1 attribute. But, I believe these can also be used in the spreadsheet. There are many examples in the Advanced Productivity - Customize Circuit Builder - How to topics that show this being done in both the marker block and spreadsheet. So it should give you an idea on how any of these can be used in the spreadsheet.
Thanks a lot! Now I have a whole bunch more pages to read! <grins>
I tested out the script you gave me and it is very close. I am currently inserting 2 of the 3 levels to test things out (Top and Bottom). Both terminals did associate but both came in as TOP. It seems I need to change the XDATA value of VIA_WD_LNUMBER to 01 for the top terminal and 03 for the bottom terminal. How do I do that? Is this an attribute I can add to the dwg? I have not had much luck with working with the XDATA values in the past...
Multi-level terminals carry a bunch of xdata to tell AcadE how many levels it is, which terminal represents which level, etc. They must be present especially if you plan on using Terminal Strip Editor.
LTOTAL = total number of levels.
LNUMBER = 2 character number that shows what level this terminal represents
L##LABEL = where ## is the 2-character number for each level. This should be present on each terminal for each level. So if 2 levels then you would have L01 LABEL and L02Label on that terminal. It carries the Level Description.
L##PINR - right pin
L##PINL = left pin
L##WIREPERC = wires per connection
These are usually added as xdata rather than attributes since the same terminal symbol can be used for terminals of different number of levels. So say a terminal is set as 2 levels you would not want any L03* attributes on it. Although I am not sure it would cause any problems in AcadE if they were there. All xdata names get a VIA_WD_ prefix onto it so LTOTAL would be VIA_WD_LTOTAL.
So that is the explanation of the names and xdata. The trick is how to assign these as Circuit Builder inserts them. I need to think on that one and see if I can think of a good way. I don't think any of the Circuit Builder APIs deal with xdata. I will post when I think of something.
If you are in a hurry you can build it and then use AEXDATA to edit the terminals after Circuit Builder is done and assign the appropriate LNUMBER values.
Thanks again Pat!
I did try this for my XT003 (Botttom terminal) but it did not work.
(C:ace_cb_insym #xyz nil "VT0002" #scl 8 "TERM01=3; LINKTERM=(eval #linkterm);(c:ace_cb_eval '(c:wd_mod_1000_xdata (entlast) 'via_wd_lnumber' 03)')")
The first terminal was inserted with a via_wd_lnumber value of 01. Makes sense...
I thought maybe using ace_cb_eval would allow me to access the wd_mod_100_xdata API. Maybe I am missing something...
Edit: I did think about your workaround already so two great minds ;-)
That might work but the LNUMBER is actually a string value. So maybe try -
(C:ace_cb_insym #xyz nil "VT0002" #scl 8 "TERM01=3; LINKTERM=(eval #linkterm);(c:ace_cb_eval '(c:wd_mod_1000_xdata (entlast) 'via_wd_lnumber' '03')')")
The trick is playing with all the single and double-quotes I think. At least that is what I was going to try.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.
The AutoCAD Electrical forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.
|AutoCAD Electrical General|