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 ??
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.
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"
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
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.
You could do this with the COM interface. This other post contains some information and links:
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.
You could look into the core console if you are using 2013.
Have a look at kean's post here
Start with some of our most frequented solutions to get help installing your software.