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

Non graphical Window of AutoCAD

8 REPLIES 8
Reply
Message 1 of 9
santoshr0114
847 Views, 8 Replies

Non graphical Window of AutoCAD

Hi Guys,

 

I need to perform some operations like count the number of line objects, get block names from a drawing file, etc.

I will not be altering a drawing object, but only getting few data from the drawing

 

I want to perform these operations without opening AutoCAD's Graphical window.

And also to mention i want to get these mentioned data from the AutoCAD database.

 

Is there a way to do so ??

 

Thank You

 

Regards
Santosh
8 REPLIES 8
Message 2 of 9
norman.yuan
in reply to: santoshr0114

Without lisencing RealDwg froom Autodesk, you still need AutoCAD running in order to use either ObjectDBX COM API, or use .NET API's Database.ReadDwgFile() to collect drawing data from Drawing, rather than open them in AutoCAD editor. Since you ask iin this forum, you would probably start from Database.ReadDwgFile() and go from there.

 

 

Message 3 of 9
arcticad
in reply to: santoshr0114

http://through-the-interface.typepad.com/through_the_interface/2007/07/accessing-dwg-f.html

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



(defun botsbuildbots() (botsbuildbots))
Message 4 of 9
santoshr0114
in reply to: norman.yuan

Hi norman.yuan,

 

I understand that AutoCAD needs to e running to get the data,

 

Is is possible to use an instance of AutoCAD and use the same instance without graphical presentation to the user, to process the drawing file and close the instance when the task is done.

 

And also i want to call my operation from outside not within AutoCAD.

I don't want to use Netload or any other AutoCAD UI, i just want to create a desktop icon and when double clicked selects a drawing and does the required task.

 

And also i would like to mention again that  "i don't want to edit the drawing, i just want to access the AutoCAD database to get some count information in the drawing"

 

Thank You

Regards
Santosh
Message 5 of 9
santoshr0114
in reply to: arcticad

Hi Arcticad,

 

I dont want to run a command inside AutoCAD.

 

I already have a program to do my task inside AutoCAD using the Netload and Passing a command.

Now i need to do the same Outside AutoCAD, With minor changes in my program

 

Thank You

Regards
Santosh
Message 6 of 9
amitnkukanur
in reply to: norman.yuan

But how will you implement Database.ReadDwgFile file option, i tried this part of code.

Database.ReadDwgFile  will work only inside autocad and not out side autocad.

 

Rgds

Amit

Senior Software Engineer
Message 7 of 9
GTVic
in reply to: amitnkukanur

You could do this with the COM interface. This other post contains some information and links:

 

http://forums.autodesk.com/t5/NET/Read-Layers-in-Active-Document-from-external-VB-Net-App/td-p/35476...

Message 8 of 9
norman.yuan
in reply to: amitnkukanur

From external EXE app, you do not use Database.ReadDwgFile() from .NET API, you use ObjectDBX COM API, which is basically the same as you open drawing in AutoCAD editor and then access data in AcadDocument via COM API, but since the drawing is not opened in editor, it is a lot fast.

 

Searching ObjectDBX in VBA forum would brings you a lot old posts on that topic.

Message 9 of 9

You could look into the core console if you are using 2013.

 

Have a look at kean's post here

 

http://through-the-interface.typepad.com/through_the_interface/2012/02/the-autocad-2013-core-console...

 



If a post provides a fix for your issue, click on "Accept as Solution" to help other users find solutions to problems they might have that are similar to yours.

Andrew Puller
Maitland, NSW, Australia
Windows 10 Enterprise 64bit
Intel core i7 11800 @ 2.30 GHz with 32GB Ram
Civil 3d 2021

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost