AutoCAD Electrical General Discussion

Reply
*Expert Elite*
testsubject
Posts: 1,077
Registered: ‎03-09-2004
Message 11 of 16 (235 Views)

Re: Another Circuit Builder Question

09-25-2012 12:02 PM in reply to: murnenp

That did not work. Nice try though. I will keep trying.

Bob Hanrahan
Ace User since 1998
Employee
murnenp
Posts: 523
Registered: ‎08-01-2007
Message 12 of 16 (228 Views)

Re: Another Circuit Builder Question

09-25-2012 01:46 PM in reply to: testsubject

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')")



Pat Murnen
Principal Content Developer
Information Modeling and Platform Products Group

Autodesk, Inc.

*Expert Elite*
testsubject
Posts: 1,077
Registered: ‎03-09-2004
Message 13 of 16 (222 Views)

Re: Another Circuit Builder Question

09-25-2012 05:16 PM in reply to: murnenp

Pat,

 

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.

 

Thanks,

Bob Hanrahan
Ace User since 1998
Employee
murnenp
Posts: 523
Registered: ‎08-01-2007
Message 14 of 16 (214 Views)

Re: Another Circuit Builder Question

09-26-2012 08:50 AM in reply to: testsubject

Bob,

 

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.

 



Pat Murnen
Principal Content Developer
Information Modeling and Platform Products Group

Autodesk, Inc.

*Expert Elite*
testsubject
Posts: 1,077
Registered: ‎03-09-2004
Message 15 of 16 (209 Views)

Re: Another Circuit Builder Question

09-26-2012 10:57 AM in reply to: testsubject

Pat,

 

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.

Bob Hanrahan
Ace User since 1998
Employee
murnenp
Posts: 523
Registered: ‎08-01-2007
Message 16 of 16 (205 Views)

Re: Another Circuit Builder Question

09-26-2012 11:17 AM in reply to: testsubject

Bob,

 

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.



Pat Murnen
Principal Content Developer
Information Modeling and Platform Products Group

Autodesk, Inc.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Manufacturing Community
The Manufacturing Community provides additional access to tips, tutorials, blogs and networking with peers.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

New AutoCAD Electrical Category!

The AutoCAD Electrical forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.

Ask the Community