Jump to content

Block VS Xref


Cracadoo

Recommended Posts

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.

Link to comment
Share on other sites

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 :D 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

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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 :D

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?
Link to comment
Share on other sites

dave's done it again :D

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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'

Link to comment
Share on other sites

Dipali has reminded me that I hadn't finished posting to this thread. The OPs glowing "thank you" put me off my stride. :D

 

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...