After looking at the Help on c:ace_cb_eval I wonder if it should be
(c:ace_cb_eval "(c:wd_mod_1000_xdata (entlast) 'via_wd_lnumber' '03')")
Doesn't this need to be encapsulated in a set of quotes because it is the last argument of the Command_List? If so, we have 3 sets of quotes to account for and I thought I read that the outermost set has to be doubles and all internal sets have to be single. Maybe you can check that for me and make sure I interpreted it correctly.
I've been looking at this all morning and think I have something that works. I think the problem was that entlast was not returning the terminal. When the terminal is inserted it breaks the wire creating a new wire and I think entlast was returning the wire. So for this to work we need a way to find that last terminal that was inserted. That is where it got messy.
The only way I could think to do this was -
First, set a variable using entlast right before the terminal is inserted. Here is what I have for the second terminal being inserted in the COMMAND_LIST field of the spreadsheet.
(c:ace_cb_eval "(setq GBL_wd_t2 (entlast))") (C:ace_cb_insym #xyz nil "HT0002" #scl 8 "TERM01=2;LINKTERM=(eval #linkterm)")
Second, write a lisp function that can be called to return the first terminal after that last entity. I have attached it. This must be loaded automatically at startup which can be defined using the APPLOAD command.
Third, add a call in the ANNOTATE_LIST field of the second terminal (probably could be in COMMAND_LIST field but it was hard to work with there) that looks like this -
(c:ace_cb_eval "(c:wd_mod_1000_xdata (c:find_term) 'via_wd_lnumber' '02')")
This extra call should be made for all terminals after the level 1 terminal. It must use the same variable, GBL_WD_t2, since the lisp function is looking for that. The level 1 terminal should still set the #linkterm with the call to generate the unique id as before. I don't think you need to set the lnumber on it though since Circuit Builder does this by default.
Maybe there was an easier way to accomplish this but I couldn't find one. Hope this works for you.
That did it!!!
Thanks so much for your help.
I did have to go back and remove the LINKTERM attribute from VT0002/HT0002. It seems that this attr was being added during the terminal insertion and I was ending up with 2 LINKTERM attributes in the block. The code was not working until I did that.
Now to start fleshing out the rest of the circuit.
glad that worked. I would be surprised if it is adding the LINKTERM attribute during Circuit Builder. If you are using the terminal symbols supplied with AcadE they would already have the LINKTERM attribute on them. It is very small so maybe you missed it?
Anyway, sounds like you are in business with that.
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.
Upgrading to a 2015 product? Make sure to check these out 1st!