TheSwamp

CAD Forums => CAD General => Topic started by: Fabricio28 on January 09, 2014, 08:23:38 AM

Title: Update block
Post by: Fabricio28 on January 09, 2014, 08:23:38 AM
Hi guys,

Happy New year and best wishes!!

I've created a block (WBLOCK) and I inserted it in a drawing.
So I needed to modify something in the block. But the block inside the drawing didn't update.
I had to inserted it again to redefine the block.

How I can update the block in the drawing without insert it?

Title: Re: Update block
Post by: dgorsman on January 09, 2014, 12:22:46 PM
You can't, or at least not without some effort.  Inserting the block prompts the user if they want to redefine the block - changing the definition is what changes the block.  There's only two ways of changing the block definition, either using the built-in insert system or use code to programmatically alter the entities in the definition.

If you *really* need to update it like that, consider using an XREF rather than a block reference.
Title: Re: Update block
Post by: Fabricio28 on January 09, 2014, 01:15:40 PM
Hi dgorsman,
Thank you for replay

Quote
If you *really* need to update it like that, consider using an XREF rather than a block reference.

I don't really need this.
I was wondering if there is a autocad command to update the block.

Regards
Fabricio
Title: Re: Update block
Post by: kentium3k on January 09, 2014, 03:37:54 PM
You could automate it if it is just one block.

(command "-insert" "test1=" "y" ^C^C)

Where test1 is the name of your block.  This assumes the block is in a folder in your search path.

If not you can include the file search path.
Title: Re: Update block
Post by: Fabricio28 on January 10, 2014, 07:10:36 AM
Wow!!!

Good kentium3k!!!

Simple code, but worked perfectly.

Thanks
Title: Re: Update block
Post by: Rob... on January 13, 2014, 07:58:30 AM
Alternatively, you could edit it from within the drawing using the block editor. You can save it out to the block file from there as well as save it in the drawing.
Title: Re: Update block
Post by: HasanCAD on January 16, 2014, 07:46:33 AM
What about using Design Center?
Title: Re: Update block
Post by: Fabricio28 on January 20, 2014, 08:58:41 AM
Thank you guys,

You helped me a lot.

I really appreciated all those suggestions.

Regards
 :-D