Author Topic: Add Attribute to insert  (Read 1602 times)

0 Members and 1 Guest are viewing this topic.

CADwiesel

  • Newt
  • Posts: 46
  • Wir machen das Mögliche unmöglich
Add Attribute to insert
« on: February 11, 2011, 08:26:59 AM »
Hi there,

I try to find a way to add attributes to inserts by VL.
Im running through different drawings using dbx and add Attributes to blockdefs - this is easy using vla-AddAttributes methode.
But the inserts also need this atts. I can't use attsync, because im on the way by dbx - commands wo'nt work.
The Background is: An Tool like Attin/Attout based on Excel. The reference is the cad handle.
If i insert an new Blockref and transfer the attribute values from an old insert to the new one and delete the old insert, than ive no maching reference at the excel sheet anymore.

I hope you can understand me.

Does someone have an idea, how i can add attributes to an blockreference

Thanks
Gruß
CADwiesel
Besucht uns im CHAT

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Add Attribute to insert
« Reply #1 on: February 15, 2011, 11:19:32 AM »
In my research, adding an attribute to an insert through ActiveX couldn't be done.  You would have to change the block definition, then reinsert all the inserts of the block.  Here is my thread when I looked into this.

[ http://www.theswamp.org/index.php?topic=8037.0 ]
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CADwiesel

  • Newt
  • Posts: 46
  • Wir machen das Mögliche unmöglich
Re: Add Attribute to insert
« Reply #2 on: February 25, 2011, 08:36:45 AM »
Thanks Willey,

again an missing part of VLisp.
Its possible with Autolisp, .NET and at all with C++

I made it on the way, delete the old inserts and insert new ones, but sometimes, when i safe the drawings, i get an message that the drawing may be corrupt and that i have to call wherest for this drawing.
Perhaps i have to learn .net

Thanks
Gruß
CADwiesel
Besucht uns im CHAT

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Add Attribute to insert
« Reply #3 on: February 25, 2011, 10:08:35 AM »
Maybe instead of deleting the old one, just delete all the entities that make up the block, and copy the other entities into the now blank block definition.  After you do it this way, then you will have to reinsert all the blocks in the drawing ( making sure to delete the old ones ), so that they get the new attributes per the new block definition.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.