Author Topic: Edit block attribute when block is already a part of DWG  (Read 1854 times)

0 Members and 1 Guest are viewing this topic.

Pilatus4me

  • Guest
Edit block attribute when block is already a part of DWG
« on: August 26, 2014, 05:39:36 PM »
The basics: Autocad 2014 VB.net

I have no issues opening the autocad file or doing a save as but I am very new to autocad and even newer as far as getting vb.net to work with it. For the last 2 days I have been searching both here and all over the internet and either what I am seeing doesn't make sense to me or when I try it there are numerous bugs in the sample code.

What I want to do: Open an autocad file, insert data into various block attributes (file has several blocks), then save the file with a different name. Repeat until all of the records in the database are done.

There has to be a relatively simple way to do this but I am too blurry eyed to figure it out. Any suggestions would be greatly appreciated. Even pointing me to resources that are accurate would be great.

Jeff H

  • Needs a day job
  • Posts: 6150
Re: Edit block attribute when block is already a part of DWG
« Reply #1 on: August 26, 2014, 06:12:34 PM »
The basics: Autocad 2014 VB.net

I have no issues opening the autocad file or doing a save as but I am very new to autocad and even newer as far as getting vb.net to work with it. For the last 2 days I have been searching both here and all over the internet and either what I am seeing doesn't make sense to me or when I try it there are numerous bugs in the sample code.

What I want to do: Open an autocad file, insert data into various block attributes (file has several blocks), then save the file with a different name. Repeat until all of the records in the database are done.

There has to be a relatively simple way to do this but I am too blurry eyed to figure it out. Any suggestions would be greatly appreciated. Even pointing me to resources that are accurate would be great.
Break it down

Quote
Open an autocad file
Open a drawing with or without editor?

Quote
insert data into various block attributes (file has several blocks),
Would seem that you typical insert "data"(which would be a string) for attribute references but might do it for definitions, I have no idea so I guess these drawings each contain a few BlockReferences that your trying to assign the value for its attributeReferences?


Quote
Repeat until all of the records in the database are done.
Is that something we need to worry about? If it is or could be replaced with a collection file names then no.





Pilatus4me

  • Guest
Re: Edit block attribute when block is already a part of DWG
« Reply #2 on: August 26, 2014, 06:32:40 PM »
With the editor is fine. This will only run on my machine and will not be distributed.

as far as the repeating is concerned right now I would be happy with being able to just insert some data into the drawing. I can handle the repeating part.

There are several blocks in the graphic, each with multiple tags that I want to change the values on, see attachment.