Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Valued Contributor
53 Posts
0 Kudos
Registered: ‎08-26-2003
Post 1 of 3

Get blocks from other drawings?

39 Views, 2 Replies
01-21-2003 10:26 PM
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
*Buzbee, James
Post 2 of 3

Re: Get blocks from other drawings?

01-21-2003 11:11 PM 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
*Friedrich, Peter
Post 3 of 3

Re: Get blocks from other drawings?

01-22-2003 01:08 AM 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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!