Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get blocks from other drawings?

2 REPLIES 2
Reply
Message 1 of 3
tvcad
146 Views, 2 Replies

Get blocks from other drawings?

Looking for an alternative to Design Center for inserting blocks from other drawings. Running A2k, W2k. Problem is that Design Center will not offer to overwrite existing blocks. Its crazy. I ask for the block in the external drawing, and Design Center says "you have to keep what you have".
I know I can purge, then insert, but that can get tedious, especially when updating multiple inserts/references.

Any routines out there? Workarounds? Thanks
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: tvcad

"vaughan" wrote:
<<
Looking for an alternative to Design Center for inserting blocks from other
drawings. Running A2k, W2k. Problem is that Design Center will not offer to
overwrite existing blocks. Its crazy. I ask for the block in the external
drawing, and Design Center says "you have to keep what you have".
I know I can purge, then insert, but that can get tedious, especially when
updating multiple inserts/references.
Any routines out there? Workarounds? Thanks
>>

No easy solution. For "importing" blocks from external drawings do a search
on this NG for "ObjectDBX". There you will find plenty of code for opening
an external drawing and using the copyobjects method for accessing all kinds
of objects.

Now for the overwriting part: someone may have a more eloquent solution but
mine would be to rename the block you plan to overwrite BEFORE importing the
new block, like "MyBlock" --> "MyBlock-trash". Then iterate through the
mspace and pspace blocks searching for all instances of "MyBlock-trash" and
replacing it with "MyBlock". Then of course delete "MyBlock-trash" from the
blocks collection.

jb
Message 3 of 3
Anonymous
in reply to: tvcad

To overwrite...

place a copy of the desired block in DWG form
within your search path

 

command: -Insert

old_block_name=new_block_name

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Looking
for an alternative to Design Center for inserting blocks from other drawings.
Running A2k, W2k. Problem is that Design Center will not offer to overwrite
existing blocks. Its crazy. I ask for the block in the external drawing, and
Design Center says "you have to keep what you have".
I know I can purge,
then insert, but that can get tedious, especially when updating multiple
inserts/references.

Any routines out there? Workarounds? Thanks

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost