Message 1 of 4
Use .net api out of CAD process!!!

Not applicable
10-23-2015
05:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,Guys,
So far CAD .net API is not working for “out of process”.It's designed only for cad command and we must keyin command then wait for the .net api functions.
offical api help saying:
When you develop a new application, it can either run in or out-of-process. The AutoCAD .NET API is designed to run in-process only, which is different from the ActiveX Automation library which can be used in or -out-of-process.
· In-process applications are designed to run in the same process space as the host application. In this case, a DLL assembly is loaded into AutoCAD which is the host application.
· Out-of-process applications do not run in the same space as the host application. These applications are often built as stand-alone executables.
If you need to create a stand-alone application to drive AutoCAD, it is best to create an application that uses the CreateObject and GetObject methods to create a new instance of an AutoCAD application or return one of the instances that is currently running. Once a reference to an AcadApplication is returned, you can then load your in-process .NET application into AutoCAD by using the SendCommand method that is a member of the ActiveDocument property of the AcadApplication."
Well, Do we have to send command to use CAD .net api? Is there any other ways to call api function in a independent ExE or dll programm? I have a programm which must be write out of CAD' process. Of course, the com ActiveX is the best choice,But its function is so limited.Such as DrawJig,Creating nurbs Curve and so on.So I am looking for a way to use CAD .net api by "out of process".
If you have any idear about this. Please advise,Thank you in advance.
So far CAD .net API is not working for “out of process”.It's designed only for cad command and we must keyin command then wait for the .net api functions.
offical api help saying:
When you develop a new application, it can either run in or out-of-process. The AutoCAD .NET API is designed to run in-process only, which is different from the ActiveX Automation library which can be used in or -out-of-process.
· In-process applications are designed to run in the same process space as the host application. In this case, a DLL assembly is loaded into AutoCAD which is the host application.
· Out-of-process applications do not run in the same space as the host application. These applications are often built as stand-alone executables.
If you need to create a stand-alone application to drive AutoCAD, it is best to create an application that uses the CreateObject and GetObject methods to create a new instance of an AutoCAD application or return one of the instances that is currently running. Once a reference to an AcadApplication is returned, you can then load your in-process .NET application into AutoCAD by using the SendCommand method that is a member of the ActiveDocument property of the AcadApplication."
Well, Do we have to send command to use CAD .net api? Is there any other ways to call api function in a independent ExE or dll programm? I have a programm which must be write out of CAD' process. Of course, the com ActiveX is the best choice,But its function is so limited.Such as DrawJig,Creating nurbs Curve and so on.So I am looking for a way to use CAD .net api by "out of process".
If you have any idear about this. Please advise,Thank you in advance.