Author Topic: Accesing Attribute Information From DWG Files  (Read 2105 times)

0 Members and 1 Guest are viewing this topic.

wannabe

  • Guest
Accesing Attribute Information From DWG Files
« on: June 06, 2009, 02:41:19 PM »
Just having a bit of a faff with my first attempt at WPF and decided I'll try and create a little application to automatically create a drawing register, as a Word Document, simply by selecting a list of drawing files.

Using a REGEX I should be able to select any attribute where the name contains "Drawing Title" +/- a couple of letters with punctuation in between.

Anyway, preamble aside, the part of the task I contemplate having the most difficulty is actually accessing the attributes (attributes = autocad attributes defined within a block). I'll need to get at these without opening up a drawing......if that's possible

Are there any swampers experienced or resourceful enough to give me some clues?



sinc

  • Guest
Re: Accesing Attribute Information From DWG Files
« Reply #1 on: June 06, 2009, 06:35:51 PM »
You should be able to create a database and use the ReadDwgFile method to read in the drawing database from the drawing of interest.  From that point on, you should be able to work on that database in much the same way as usual.

wannabe

  • Guest
Re: Accesing Attribute Information From DWG Files
« Reply #2 on: June 07, 2009, 03:57:02 AM »
Thanks.

Bobby C. Jones

  • Swamp Rat
  • Posts: 516
  • Cry havoc and let loose the dogs of war.
Re: Accesing Attribute Information From DWG Files
« Reply #3 on: June 08, 2009, 08:05:07 AM »
Just remember to call .Dispose() on the database after you're finished reading the data from it.
Bobby C. Jones

wannabe

  • Guest
Re: Accesing Attribute Information From DWG Files
« Reply #4 on: June 08, 2009, 09:09:47 AM »
Just remember to call .Dispose() on the database after you're finished reading the data from it.

Thanks.

Althoug the application is on  hold at the moment; It's so easy to circumnavigate your intended goals when playing around with WPF.