Copy Block Attributes to Another Block

Copy Block Attributes to Another Block

Anonymous
Not applicable
431 Views
1 Reply
Message 1 of 2

Copy Block Attributes to Another Block

Anonymous
Not applicable
I'm fairly new to VBA and manage to piece together little bits here and there.

I have a script that inserts a block into a drawing. I need to add some VBA code that copies selected attribute values (based on the tag) from another block to this new block with the same tag names, and then delete the old block.

Can anyone get me started? Much appreciated.
0 Likes
432 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
once you have your "input" and output blockrefs,
use .HasAttributes .GetAttributes then step through the array of
attrefobjects using .TagString and .TextString
f1 should have everything else you need...
:-)
if you have trouble post back with what you have and what's not working...
hth
mark

wrote in message news:5748669@discussion.autodesk.com...
I'm fairly new to VBA and manage to piece together little bits here and
there.

I have a script that inserts a block into a drawing. I need to add some VBA
code that copies selected attribute values (based on the tag) from another
block to this new block with the same tag names, and then delete the old
block.

Can anyone get me started? Much appreciated.
0 Likes