Community
AutoCAD LT Forum
Welcome to Autodesk’s AutoCAD LT Forums. Share your knowledge, ask questions, and explore popular AutoCAD LT topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Redefining Blocks with a script

1 REPLY 1
Reply
Message 1 of 2
MartynCowley3208
1117 Views, 1 Reply

Redefining Blocks with a script

I need to redefine a number of Blocks in numerous existing drawings. I have redrawn the Blocks and Wblocked each of them to individual drawings. From within a drawing that requires the redefinitions I run a script to insert the new version eg:

-insert
detector=C:/.../detector.dwg

the command asks for an insertion point - since I do not need to actually insert a copy of the Block, I press ESC at this stage.

I then repeat this with the appropriate script for each of the Blocks to be redefined.

I have tried to create a combined script to redefine all the Blocks in a single operation by inserting ESC between the lines eg:

-insert
detector=C:/.../detector.dwg
ESC

-insert
alarm=C:/.../alarm.dwg

but this doesn't work - the script hangs at the first insertion, asking for the insertion point - pressing ESC simply terminates the script.

How can I get the script to skip the insertion and go on to the next?

1 REPLY 1
Message 2 of 2

Something to read on Scripts: (Can I use the same answer twice?)

http://www.ellenfinkelstein.com/autocadtips/AutoCAD_tips_automate_scripts.html

 

What if you added 0,0 as the insertion point and then maybe an ERASE; Last; to the Script? (the Colons here are punctuation)

Can that be done?

 

SWAG - to this one

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

Post to forums  

Autodesk Design & Make Report

”Boost