I really like scripts, they automate mundane repetetive tasks. And AutoScript freware from Cadig is awesome!
One of my favorite script routines is to replace an existing block with an updated version. When I first tried to do this I could not figure out how to stop the process after redefining the block using insert =. Mark Middlebrook came to my rescue on that, and I would like to share it with you all.
The basic script consists of
-insert
blockname=
(command /e "resume")
Of course you can add any other bits of script that you need, but once it hits the (command /e "resume") it stops the insert process after having redefined the block.
The ususal caveats apply - the block must reside on the search path, it must be compatible and so on.
I hope you find this as useful as I have!
Solved! Go to Solution.
Solved by Volker_C. Go to Solution.
Hi Jeff,
That's a great tip. Thanks for sharing!
Cheers,
Volker
Please let us know if your questions have been answered by selecting, "Accept as Solution"
Volker C.
SR Technical Support Specialist, KDE
Autodesk Customer Council | Only One AutoCAD | AutoCAD Blog
I enjoy scripts as well, I had a hard time getting that to work. You can also do the old tried and true of insterting it / redefining with a path and then erasing the one you inserted. I also typically set the expert mode to 0 before running scripts or publishing them to our group.
EXPERT
0
-INSERT
Di_Local_3L=P:\CADD\CADWORX_SUPPORT\V2014\REX\P&ID\Di_Local_3L.dwg
0,0
1
1
0
ERASE
L
QSAVE
You can do more than 1 at a time by adding multiple sequences in the same script. I attached my script and hopefully you can download it to play with.
(I had to change the extension from ".scr" to ".txt" for it to upload; you will need to change it back to ".scr" for it to function...and of course customize with your own block and path)
I hope that helps some. Have a good one!