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: 

Lisp question for ace_multipole command

1 REPLY 1
Reply
Message 1 of 2
keithjk
444 Views, 1 Reply

Lisp question for ace_multipole command

I have a lisp program that I use to automatically insert components and update the catalog information.  Works great on single components but came across a problem when I try to use the (c:ace_multipole) command.

 

The following is from from my lisp program.

(setq LastEnt (c:ace_mulitpole "h:/electricalcatalogs/libs/iec2/vcb1" 4 (list x y) 21)

(c:wd_modattrval LastEnt "CAT" CatalogNo)

(c:wd_modattrval LastEnt "MFG" Manufacturer)

It inserts schematic symbol "VCB1" as a 4 pole circuit breaker, builds it to the right, with no prompts for catalog info.  I want the catalog info to be inserted automatically (which the wd_modattrval command will do).  The problem is LastEnt is not set to anything when I use ace_multipole.  (see attached).

 

I can create code to use my x y insertion point, filter for the block name (VCB1), and then update the catalog info but I want to know if there is an easier way before I go that route.


Any suggestions?

1 REPLY 1
Message 2 of 2
PatMurnen_Adsk
in reply to: keithjk

I am guessing that the c:ace_mulitpole does not return the last entity inserted. So you need to get it another way. I would try this - (c:ace_mulitpole "h:/electricalcatalogs/libs/iec2/vcb1" 4 (list x y) 21) (setq LastEnt (entlast)) (c:wd_modattrval LastEnt "CAT" CatalogNo) (c:wd_modattrval LastEnt "MFG" Manufacturer) If that does not work, or if it isn't the right entity (since this is inserting more than one entity), there are other ways that could be tried. Hope this helps, Pat Murnen


Pat Murnen
Principal Content Developer
Product Development – AutoCAD Product Line Group

Autodesk, Inc.

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

Post to forums  

Autodesk Design & Make Report

”Boost