.NET

Reply
Member
borut.slatinsek
Posts: 3
Registered: ‎07-01-2011
Message 1 of 10 (319 Views)

Read dwg extents

319 Views, 9 Replies
07-01-2011 06:29 AM

Hi!

 

I would like to make windows service (.NET C#), which would watch directory changes and read dwg extents, if file extension was .dwg.

Is this possible to make on machine, where autocad isn't installed?

*Expert Elite*
arcticad
Posts: 1,285
Registered: ‎06-21-2004
Message 2 of 10 (310 Views)

Re: Read dwg extents

07-01-2011 08:24 AM in reply to: borut.slatinsek

You would have to use RealDWG or OpenDesign

 

http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=770257

 

http://www.opendesign.com/

 

---------------------------



(defun botsbuildbots() (botsbuildbots))
Member
borut.slatinsek
Posts: 3
Registered: ‎07-01-2011
Message 3 of 10 (302 Views)

Re: Read dwg extents

07-01-2011 09:22 AM in reply to: arcticad

Is there no free alternative?

*Expert Elite*
dgorsman
Posts: 5,044
Registered: ‎10-12-2006
Message 4 of 10 (273 Views)

Re: Read dwg extents

07-04-2011 09:22 AM in reply to: borut.slatinsek

Could you elaborate on the reasoning behind this?  There may be "in drawing" solutions that could fulfull the requirements.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
Adopt. Adapt. Overcome. Or be overcome.
A good question will be halfway to a good answer.


Member
borut.slatinsek
Posts: 3
Registered: ‎07-01-2011
Message 5 of 10 (218 Views)

Re: Read dwg extents

01-26-2012 01:49 AM in reply to: borut.slatinsek

I am working on application, which creates database with information of extents of DWG, TIF and other geolocated files.

Then user can click on some location on the map and check which files are under that location.

I solved all other formats, but not dwg. I can read DWG extents only inside autocad.

 

If there is no free solution to do this without AutoCAD, is this possible on machine that has AutoCAD installed without running autocad?

 

Thank you in advance!

*Expert Elite*
arcticad
Posts: 1,285
Registered: ‎06-21-2004
Message 6 of 10 (191 Views)

Re: Read dwg extents

01-26-2012 11:01 AM in reply to: borut.slatinsek

If you don't want to pay for a solution then you will have to create an instance of AutoCAD to be able to run your code, 

 

---------------------------



(defun botsbuildbots() (botsbuildbots))
Valued Mentor
fieldguy
Posts: 366
Registered: ‎03-31-2005
Message 7 of 10 (181 Views)

Re: Read dwg extents

01-26-2012 01:05 PM in reply to: borut.slatinsek

Yes.  You can search here for "out of process" or "unmanaged".  There should be several examples.  What version of acad are you targeting?

*Expert Elite*
arcticad
Posts: 1,285
Registered: ‎06-21-2004
Message 8 of 10 (172 Views)

Re: Read dwg extents

01-26-2012 02:37 PM in reply to: borut.slatinsek

I'd like to know what your referring to...

 

You will still have to connect to AutoCAD to run your application via ActiveX API and create an instance of AutoCAD.

You don't need to show autocad on the screen but it's still running.

---------------------------



(defun botsbuildbots() (botsbuildbots))
Valued Mentor
fieldguy
Posts: 366
Registered: ‎03-31-2005
Message 9 of 10 (167 Views)

Re: Read dwg extents

01-26-2012 03:09 PM in reply to: fieldguy

Scratch that - sorry.  I was taking out-ot-process too literally.

Valued Contributor
FFlix
Posts: 95
Registered: ‎11-15-2011
Message 10 of 10 (164 Views)

Re: Read dwg extents

01-26-2012 03:43 PM in reply to: borut.slatinsek

hi borut

 

autodesk publish dxf code references as pdf file by autocad version here:

http://usa.autodesk.com/adsk/servlet/item?linkID=10809853&id=12272454&siteID=123112

 

it's introduction says that "The DXFformat is a tagged data representation of all the information contained in an AutoCAD® drawing file. Tagged data means that each data element in the file is preceded by an integer number that is called a group code."



so therefore i think that once you have a .dwg file saved as a .dxf file, you could write a .net application that searches this .dxf file for respective group codes and associated values; e.g. the dxf 'header variables' for drawing extents are given on p19 (i.e. from the acad2011 ref). unfortunately, i haven't done this myself, but .dxf files can be used by non-acad software.

 

felix

 

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community