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

Standalone ObjectARX application hosted in windows service, is it possible?

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
m.yenafaradam
1692 Views, 6 Replies

Standalone ObjectARX application hosted in windows service, is it possible?

Hi,
We are trying to write a windows service and manipulate DWG files there. In our computer we have already AutoCAD installed. 
It seems with ObjectARX , it is just possible to write .Net dlls which will be hosted in AutoCAD application not any standalnoe application.Did we get it right?

we know about RealDWG but the problem  is that we also need ability to plot(save) manipulated files, which is not possible with RealDWG.
Is there any other solution for writing a standalone application can manipulate and plot( pdf) DWG files?
Is there any solution with AUTODESK product for our problem?

Thanks .

6 REPLIES 6
Message 2 of 7

If AutoCAD is installed then you can use it as a COM server from your standalone aplication.

Nikolay Poleshchuk
http://poleshchuk.spb.ru/cad/eng.html
Message 3 of 7

Thank you Nikolay
Yes, but we are trying to find a managed solution(it seems it is not possible) it makes our application more maintainable and easier to develop with already available .Net classes.
How about the ability of an ObjectARX  dll hosted in AutoCAD. Is it possible dealing with threads (other application level classes) and making AutoCAD application as a server application in our computer and calling our dll hosted in AutoCAD with IPC? I mean it is safe to run Autocad for example for one week(without any restarting the application) to automate our tasks?
Is there any document about application memory management and domain managment of a hosted dll in AutoCAD?

Message 4 of 7
Balaji_Ram
in reply to: m.yenafaradam

There could be memory leaks that will get in your way if you are working with AutoCAD without closing it for weeks.

 

For such purposes a better solution is to use the AccoreConsole.exe that was introduced in AutoCAD 2013. You may be interested in this blog post :

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

 

In this blog post, a batch file continuously looks for drawings in a folder and plots PDF for it.

It is also possible to run custom commands implemented using ObjectARX / .Net.

 

 

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

Message 5 of 7
m.yenafaradam
in reply to: Balaji_Ram

Thank you Balaji for your answer and the link.
Now, we are looking in AccoreConsole.exe, as I understood it truly in AccoreConsole.exe we can just work on one DWG file which is passed by /i switch command to it and we wont be able to open another DWG file , it means we should run a new instance of it for each plotting and editing purpose.


I want to ask it is possible to plot a DWG file (already loaded in AccoreConsole )not with script but with ObjectARX loaded in AccoreConsole silently without any UI dialog and loading stuff I could not find any sample for it.
Exactly the question, is it possible to plot DWG document ( Application.DocumentManager.MdiActiveDocument  ) in a .net dll loaded in AccoreConsole.exe (namespace are supported in accoremgd.dll but we got some error it seems PlotEngine)?
Do we misundestand something about the concept of  AccoreConsole for example it is not possible use PlotEngin in CRX dlls from points of  AccoreConsole concept ?

Br,

Message 6 of 7
Balaji_Ram
in reply to: m.yenafaradam

Yes, you will need to work on the drawing that is passed it to it using /i switch and you will need a different instance of accoreconsole for each plotting. But accoreconsole is designed for such purposes and unlike AutoCAD with UI, the startup time is very less. So this should not be a problem.

 

You can plot from your custom command and there is no such limitation in accoreconsole.

For example, you can create a plotting command as in this blog post and call the custom command from the script.

http://through-the-interface.typepad.com/through_the_interface/2007/09/driving-a-multi.html

 

Please let me know the error in doing that and I will look into it.

 

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

Message 7 of 7
m.yenafaradam
in reply to: Balaji_Ram

Hi,
After you mentioned that there is not such limiation for plotting, I wrote my code again and then it worked, It seems I missed something while plotting. 

thank you Balaji  it really helped.

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

Post to forums  

Autodesk Design & Make Report

”Boost