sinnerboy Posted October 16, 2012 Posted October 16, 2012 I am trying to write a macro script to rename ( dozens ) of blocks in dozens of files. It is working fine except for one block which has a gap in it's name. The script stops running when it comes to it. -rename;;b;A2-1 EE;EVAC11;;b;a2-2-EEO;EVAC12;;b;a2-3-EEDNB;EVAC13 This is a cut / patch paste - the problem block is highlighted red i.e. block named A2-1 EE. AutoCAD rips through all the blocks in the script which come before it ( which I have not pasted up here ) and stops stating "cannot find block named A2-1". The script does not "like" the gap in the blockname. I have a simple workaround for now - take this block out of the script and deal with it manually in each file. Is there any way to fix the script however i.e. make AutoCAD see the full blockname , gap and all ? Quote
MSasu Posted October 16, 2012 Posted October 16, 2012 To be able to use names with spaces in script files you need to enclose them in quotes: "A2-1 EE" Quote
sinnerboy Posted October 16, 2012 Author Posted October 16, 2012 Thanks but now I'm getting Cannot find block " "A2-1" Quote
MSasu Posted October 16, 2012 Posted October 16, 2012 Seems that you missed to enclosed in quotes the entire name. "A2-1 [color=red]EE[/color]" Quote
MSasu Posted October 16, 2012 Posted October 16, 2012 Glad to hear that is solved now. You're welcome! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.