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

Wish I could use OpjectARX...

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
301 Views, 2 Replies

Wish I could use OpjectARX...

I need to have an app that *opens* AutoCad, not a menu in AutoCad.

 

I could do everything I need (I think) if I could do but one thing. If I could write code like:

 

Autodesk.AutoCAD.ApplicationServices.Application oAcad;

oAcad = new Autodesk.AutoCAD.Interop.AcadApplication();

 

or perhaps

 

Autodesk.AutoCAD.ApplicationServices.Application oAcad;

oAcad = (Application)new Autodesk.AutoCAD.Interop.AcadApplication();

 

Then I could do everything I need to do with objectARX, i.e.,

 

Create a stand-alone batch program (run from the Task Scheduler) that launches ACAD and then processes a set of files through ACAD to product normalized output as per an externals database.

 

A real advantage for me would be that I would then be able to properly destroy plot configurations (plotConfig = null) to get past the sticky polt config problem.

 

Is there a way I can get to something like this?

 

thanks

 

tc

 

2 REPLIES 2
Message 2 of 3
adam.nagy
in reply to: Anonymous

Hi,

 

Are you talking about the .NET API?

 

You can start AutoCAD using the COM API or you can simply use windows API to start a new process (acad.exe)

 

If your .NET Addin (or ObjectARX app, same thing) is set up for loading on startup (e.g. in the registry, or from AutoCAD 2012 onwards using AutoLoader) then once AutoCAD is started (does not matter who or how starts it) then you can do with your addin whatever you need - e.g. iterate through the content of a folder and process the drawings there, etc.

 

I hope this helps.

 

Cheers,

Adam Nagy

Autodesk Developer Network



Adam Nagy
Autodesk Platform Services
Message 3 of 3
Anonymous
in reply to: adam.nagy

Yes, I am using the .NET API (I think)

 

Documents, for example, are objects the ObjectARX sees to be under the Application object. I do not seem to be able to set or assign the Application object. Are you saying that *IF* I launch AutoCAD using the COM Introp object that *THEN* ObjectARX will see it as the Application Object?

 

On a related question, I have found that on 2009 (which I re-writing now to 2012), that there is some sort of memory leak, so after processing a few hundred drawings, I would close the Interop AcadApplication, set it to null, an re-open. Don't know yet if I need to do this in 2012. If so, would the above still hold?

 

thanks

 

tc

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

Post to forums  

Autodesk Design & Make Report

”Boost