Cracadoo Posted November 17, 2008 Share Posted November 17, 2008 Halo all, I'm here on the forums for few months now, I have been reading and learning a lot from here. So, thank you all, you have been very helpful. Now, I'm having a question. I'm working in home automation company, so i need to place lots of equipment symbols on top of apartment layout. Thing is, those blocks are about to change in time, so I'm looking for a way to replace old with new ones. It will be real pain if i have to update blocks for every drawing, since I'm having around 50 drawings at the moment, and there will be more. I've been thinking about using xrefs instead of blocks, but since most of my blocks are dynamic, xrefed blocks are loosing dynamic properties. So, the question is: Is there a way for a block to be loaded from external file, like xref, so when i change source block all blocks on all drawings change as well? That would be really handy, and I can not believe that there is no way to do such simple thing in Acad. Thanks all. Quote Link to comment Share on other sites More sharing options...
nocturne00 Posted November 17, 2008 Share Posted November 17, 2008 First up, Welcome to the forums it could be done, but not the way you want it, im unaware of a way blocks are directly xrefed. there is a procedure i do for such instances, but the procedure is a bit unorthodox here goes; the xref mother file where all your blocks are doesnt need to have the objects inside as blocks, just have them layed out on model space. Now, attach the xref. since you need only one object in the xref as your supposed to be block, Use XCLIP on the object you only need to view. afterwards you could make copies of the clipped xref inside the file as many times as you want. these can be reloaded fron the mother xref file. Give me a feedback if my explanation is a bit vague. Cheers Quote Link to comment Share on other sites More sharing options...
dbroada Posted November 17, 2008 Share Posted November 17, 2008 it is relatively simple if your house keeping is good. If you have kept your blocks in a library you update the library file then use the command line -INSERT AND GIVE YOUR BLOCK NAME WITH A - ON THE END. tHIS WILL INSERT THE UPDATED BLOCK.. (sorry about the caps lock). You can write a script to save you typing the block name each time and if you want you can batch process the script to do your 50 drawings (which isn't many btw - we often do this on several hundred - occasionally on about 1500) Quote Link to comment Share on other sites More sharing options...
dbroada Posted November 17, 2008 Share Posted November 17, 2008 First up, Welcome to the forums it could be done, but not the way you want it, im unaware of a way blocks are directly xrefed. there is a procedure i do for such instances, but the procedure is a bit unorthodox the xref mother file where all your blocks are doesnt need to have the objects inside as blocks, just have them layed out on model space. Now, attach the xref. since you need only one object in the xref as your supposed to be block, Use XCLIP on the object you only need to view. afterwards you could make copies of the clipped xref inside the file as many times as you want. these can be reloaded fron the mother xref file. Give me a feedback if my explanation is a bit vague. Cheers I'm about to eat my breakfast so haven't read all this but how does using an XREF keep the dynamic properties? Quote Link to comment Share on other sites More sharing options...
nocturne00 Posted November 17, 2008 Share Posted November 17, 2008 dave's done it again will this overwrite the current block on the file with the updated one from the library? on your inquiry, actually it doesnt. i just use them to load up non dynamic blocks. Quote Link to comment Share on other sites More sharing options...
Cracadoo Posted November 17, 2008 Author Share Posted November 17, 2008 Thanks for fast replays guys, I rely appreciate it. Thing is I'm the only cad person in company. I have been working in CAD for quite a while in architectural co, and now I'm setting things up in my new working place. I now that it's important to set things up properly from very start, so I'm trying to keep things as neat as possible so any future work will be done in easier and faster manner. @Nocturne00, that's not going to work due to dynamic blocks. Thanks for effort. @Dbroada, I'll give it a try. Thanks a lot. Quote Link to comment Share on other sites More sharing options...
nocturne00 Posted November 17, 2008 Share Posted November 17, 2008 hey no probs. learned something useful here today again. try and come up with a script as dbroada suggested. I just started learning about it and the rewards are very very useful. Cheers Quote Link to comment Share on other sites More sharing options...
dbroada Posted November 17, 2008 Share Posted November 17, 2008 corrections now that I am at work I realise I gave duff info. The general theme is right but the suffix to BlockName is = (not -) I will give a fuller overview at lunch time if you can wait. (If not, hard luck!) Sorry for the broken information but its how I have so many posts to my name! Quote Link to comment Share on other sites More sharing options...
dbroada Posted November 17, 2008 Share Posted November 17, 2008 OK, bit more time now. To update a single block from an external file you can use the INSERT dialogue box. Browse your way to the new definition and select it. AutoCAD will give you a message box something like "2 insertions of this block already exist. Do you want to redefine the block?". At which you answer Y then press escape and your existing blocks will update. To do this on the command line you type -INSERT BlockName= I can't remember if you get asked about redefining - I think you are. Once it is redefined you press escape and all existing blocks are updated. The problem comes if you want to write a script. I don't know a way of sending an escape through script - however you can insert your block and then ERASE L to erase the last entity. Your script will be something like... -insert Fred= y 0,0 1 1 0 zoom e erase l this inserts the updated block @ 0,0 and an x & y scale of 1 and a rotation of 0. It then zoom extents as earlier versions of AutoCAD the LAST entity was the last visible entity - if your last entity wasn't on screen it didn't get picked up and finally the most recent entity (your new block) is deleted. the command line version of INSERT can also be used to redefine existing blocks from a file with a different name but I'll let you F1 that. Quote Link to comment Share on other sites More sharing options...
Cracadoo Posted November 17, 2008 Author Share Posted November 17, 2008 Hey, man. You are life savior. I really appreciate your effort to brake it up like that. Thanks A LOT, mate. Quote Link to comment Share on other sites More sharing options...
Dipali Posted November 18, 2008 Share Posted November 18, 2008 OK, bit more time now. To update a single block from an external file you can use the INSERT dialogue box. Browse your way to the new definition and select it. AutoCAD will give you a message box something like "2 insertions of this block already exist. Do you want to redefine the block?". At which you answer Y then press escape and your existing blocks will update. It can be done using design centre also. it alos ahs option called 'redefine only' Quote Link to comment Share on other sites More sharing options...
dbroada Posted November 18, 2008 Share Posted November 18, 2008 Thanks Dip, I do forget about design centre as I find using -insert is so easy. Quote Link to comment Share on other sites More sharing options...
dbroada Posted November 18, 2008 Share Posted November 18, 2008 Dipali has reminded me that I hadn't finished posting to this thread. The OPs glowing "thank you" put me off my stride. Once you have your script sorted you can set up a batch file to run a script on all the drawings in a folder. You will have to search this forum to find instructions as I have a VB routine that does it for me. You will have to decide whether you want to batch process or "do it by hand". For me, its at about 10 drawings that I would batch them. Before we had the batch process routine we used to build our scripts up using DOS DIR command and then use excel find|replace to create long strings that would open a drawing, so some stuff then qsave before opening the next drawing on a list. 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.