memphis710 Posted December 19, 2007 Share Posted December 19, 2007 I have created several drawings containing blocks and now that, handily I am half way through, my client has decided he wants to change their appearance. (Make part of the block visible on screen, but not when plotted). Is there a way of updating ALL of the so far completed drawings with the new block, without having to basically start from scratch? I have modified the blocks in the latest drawing and re-defined the blocks under the same names Cheers Quote Link to comment Share on other sites More sharing options...
Guest Alan Cullen Posted December 19, 2007 Share Posted December 19, 2007 You can always use BEDIT, and edit the block to cut out the half he doesn't want to a non plottable colour. Quote Link to comment Share on other sites More sharing options...
memphis710 Posted December 19, 2007 Author Share Posted December 19, 2007 Cheers for that, however I have got 150 Drawings with around 200 - 250 blocks in each... Is there another way? (Other than telling the client where to go?!?) Quote Link to comment Share on other sites More sharing options...
Guest LElkins Posted December 19, 2007 Share Posted December 19, 2007 memphis, can you please tell me what version of autocad you are using, the file name of the block that you want to insert, and the install location of autocad. Cheers Quote Link to comment Share on other sites More sharing options...
memphis710 Posted December 19, 2007 Author Share Posted December 19, 2007 AutoCAD LT 2005 (at the moment) the blocks are RM2 0no. Wing RM2 1no. Wing Install dir: C:\Program Files\Autodesk\AutoCAD 2005 LT\ Quote Link to comment Share on other sites More sharing options...
Guest LElkins Posted December 19, 2007 Share Posted December 19, 2007 memphis, i am working on a script for you, but i had done so hoping that you has at least full autocad so that you could use the express tools. is there a chance that you could download a trial version of full autocad to use for this process? if not, do you have any access to a machine with full autocad? cheers Quote Link to comment Share on other sites More sharing options...
Guest LElkins Posted December 19, 2007 Share Posted December 19, 2007 ok, memphis, read this very carefully and if you are unsure of anything then please ask. try what i describe below with example files first. create a new drawing and create blocks in it called new_test and save it in C:\ then wblock some linework and save it in C:\cad_file\new_block.dwg open notepad and copy the code below and save as blockreplace.scr -layer n newblocklayer s newblocklayer -insert C:\cad_files\new_block 0,0 1 1 0 -blockreplace new_test new_block y layerp -laydel n newblocklayer y qsave quit when you have tried this and happy that it works and want to use it on your project drawings, in the code above, replace C:\cad_files\new_block with the path of your new block. For some reason i can not get it to work with space in file name so replace all spaces with underscore, this includes folder names. replace new_test with the name of the existing block which will be replaced. open a new notepad and copy the code below and save it to a file called block_replace.bat FOR %%V IN (*.DWG) DO START /W "c" "C:\Program Files\AutoCAD Architecture 2008\acad.exe" %%V /nologo /b "C:\blockreplace.scr" FOR %%V IN (*.BAK) DO DEL %%V In this, replace the AutoCAD Architecture 2008 with the version that you are using. Put both block_replace.bat and blockreplace.scr in C:\ and also put your drawings there. when running the routine you will not be able to use your machine so will be best to run over luch. to run the routine just double-click on block_replace.bat hope this helps. if any of this is unclear then please just ask and i will be more than happy to help. cheers Quote Link to comment Share on other sites More sharing options...
memphis710 Posted December 19, 2007 Author Share Posted December 19, 2007 Thanks very much, you're a star. Will try this as soon as I get my proper copy of autocad back!! I'll let you know how I get on. Cheers!! Quote Link to comment Share on other sites More sharing options...
Guest LElkins Posted December 19, 2007 Share Posted December 19, 2007 no problem memphis. like i said, it may not make much sense if you are unsure what is happenning, so if i didnt make anything clear enough then please ask. thanks Quote Link to comment Share on other sites More sharing options...
memphis710 Posted January 3, 2008 Author Share Posted January 3, 2008 LElkins, I can get the test to work, but I now have the problem of spaces in the original Block name... Bugger!! Cheers for the script though, quite simple when looked at like that. Does make sense. Now... Anyone any Ideas about using spaces in AutoCAD scripts? The following: -blockreplace new_test new_block y layerp -laydel ...needs to read -blockreplace 100 'H' Frame new_block y layerp -laydel (100 'H' Frame is the original Block name) Quote Link to comment Share on other sites More sharing options...
dumfatnhappy Posted January 3, 2008 Share Posted January 3, 2008 you can't just wblock those updated blocks to the same directory and do an "insert=" in each drawing and be done with it ? Quote Link to comment Share on other sites More sharing options...
memphis710 Posted January 3, 2008 Author Share Posted January 3, 2008 LElkins, cheers for the script. Got it to run standalone with the correct files. However, I cant get the batch script to run properly. It loads up acad, and the first drawing file, but acad loads with the error pictured. It says it cant find the old block, (I have checked the name of the block and it is right) and skips on to the next line in the script, still searching for a valid block. Is this due to the incorrect drawing loading in the first instance? txt file is acad command output. Cheers so far, great help. Error.txt Quote Link to comment Share on other sites More sharing options...
memphis710 Posted January 4, 2008 Author Share Posted January 4, 2008 dumfatnhappy, that is what I am doing with the script, but with the shear volume of drawings and blocks within the drawings, I need an automated script. Quote Link to comment Share on other sites More sharing options...
crgonzo Posted April 14, 2009 Share Posted April 14, 2009 memphis, ever get an answer to the "space" problem? Quote Link to comment Share on other sites More sharing options...
memphis710 Posted April 15, 2009 Author Share Posted April 15, 2009 Hi crgonzo, I didn't get a reply as such but had a bit of a search round on google. I think I eventually found and used this free program - http://www.softpedia.com/get/Windows-Widgets/Widget-Miscellaneous/Space-Remover.shtml Little batch program that removes the spaces from filenames and replaces them with underscores. Seemed to work a treat! Hope this helps. memphis Quote Link to comment Share on other sites More sharing options...
dbroada Posted April 15, 2009 Share Posted April 15, 2009 I don't have time to read all of this but I thought enclosing the file name within quotes allows spaces. At least that's how I do my scripts. Quote Link to comment Share on other sites More sharing options...
Sickguy Posted April 15, 2009 Share Posted April 15, 2009 I have created several drawings containing blocks and now that, handily I am half way through, my client has decided he wants to change their appearance. (Make part of the block visible on screen, but not when plotted). Is there a way of updating ALL of the so far completed drawings with the new block, without having to basically start from scratch? I have modified the blocks in the latest drawing and re-defined the blocks under the same names Cheers what version of ACAD are you running? in newer version you can "right click" and look for the "edit block" option. from there you can go into the "block editor mode and edit the block as its own seperate drawing. once saved it works sort of like an xref and will universally update all. to make part of the block print, in the block you can create a layer thats a no plot layer, or simply put the parts you dont want visible on defpoints. Quote Link to comment Share on other sites More sharing options...
GE13579 Posted April 15, 2009 Share Posted April 15, 2009 This was suggested earlier but not suitable due to the number of drawings and blocks- Cheers for that, however I have got 150 Drawings with around 200 - 250 blocks in each... Is there another way? (Other than telling the client where to go?!?) Quote Link to comment Share on other sites More sharing options...
Sickguy Posted April 15, 2009 Share Posted April 15, 2009 This was suggested earlier but not suitable due to the number of drawings and blocks- 250 blocks is pretty excessive. would have to understand the format he is working in i guess in order to give solid advice. Quote Link to comment Share on other sites More sharing options...
GE13579 Posted April 15, 2009 Share Posted April 15, 2009 I believe the initial query was resolved, just that there was a follow up regarding adjusting the scripts. :wink: Quote Link to comment Share on other sites More sharing options...
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.