.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

display DWG attributes in aspx page

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
614 Views, 6 Replies

display DWG attributes in aspx page

Hi Folks - VERY new to AutoCAD here.  I have a bunch of dwg files (100+) that are Piping and Instrument Diagrams for a refinery.  The files sit on a network folder.  The filenames are rather cryptic.  i.e. 00-P-2-77894.dwg  this refers to a location/section in the refinery.  In the network directory there is an excel file with all dwg files listed with additional meta data.  (Document Title, Created On, Last Modified by, etc...)  This is a pain to keep up.  I would like to develop an aspx page as a replacement for the excel file that simply lists (ala Windows Explorer Details view) all dwgs in a folder (including columns for filename, Document Title, Created On, etc...).  I found the OpenARX SDK.  I have a new c#.net website created with references to AcCoreMgd, AcDbMgd, and AcMgd.  But after that im stuck.  I can iterate through all files in the dir no problem but I'm not sure how to pull attribute information from the dwg files.  All examples that I see involve opening the dwg up in some type of viewer and issuing commands.  Thats not what I want.  I need an aspx page that iterates through a directory of dwgs and lists the attributes in a tabular format.  ANY help is appreciated.

6 REPLIES 6
Message 2 of 7
dgorsman
in reply to: Anonymous

In order to do that, you will need to use ObjectARX (in C++) along with RealDWG.  Rather pricey and fairly complicated, as there is no graphics interface.  In a similar vein, but slightly less complex (and far cheaper), you might make more headway working with DWF files.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 3 of 7
StephenPreston
in reply to: dgorsman

To programmatically extract data from DWG files, you'll have to either open them in AutoCAD and use one of the AutoCAD APIs (C++, .NET, LISP or ActiveX) to query the drawing, or (as dgorsman says) you can license RealDWG so that you don't need to use AutoCAD. (BTW dgorsman, RealDWG supports .NET and ActiveX (via COM Interop) as well as C++).

 

You might also look at the DATAEXTRACTION command in AutoCAD to see if that gives you what you need.

 

See www.autodesk.com/developautocad and www.autodesk.com/realdwg for more information on the APIs I mentioned.

 

 

Cheers,

Stephen Preston
Autodesk Developer Network
Message 4 of 7
Anonymous
in reply to: StephenPreston

If I understand you correctly sound like you got everything you need just use FileInfo

Message 5 of 7
StephenPreston
in reply to: Anonymous

Good point Jeff. It depends what data is needed. I was assuming it was data stored inside the DWG (from title blocks etc), but maybe its just the drawing properties.

Cheers,

Stephen Preston
Autodesk Developer Network
Message 6 of 7
dgorsman
in reply to: StephenPreston

Stephen, if RealDWG can indeed be used with C# .NET EXE's you may have just sold a license here... I'll have to do some digging.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 7 of 7
StephenPreston
in reply to: dgorsman

@dgorsman - it definitely can. It essentially gives you everything in acdbmgd.dll (i.e. full access to the DWG database, but no application or editor functionality). TechSoft 3D are our global distributors for this SDK - http://www.techsoft3d.com/autodesk#section-realdwg.

 

 

Cheers,

Stephen Preston
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report