Message 1 of 4
Invoking / communicating with external applications

Not applicable
03-06-2008
05:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello
I wrote an external Visual C++ MFC Dialogue application that creates a DXF file based on existing data files and options.
What I would like to do is one of two things:
1. Have VBA macro that executes my application, and then if it terminates with OK obtains the DXF file that was created and DXFin into current DWG file.
2. Do a ShellExecute from my external application in such a way that it will dxfin the DXF file into the running instance of Autocad.
I have looked into both and have problems. If I do a shellexecute to run acad.exe with a script to dxfin the file, it will always do a new instance of acad. If I shellexecute using the DXF as the parameter it will open the dxf in the running instance. That is half of what I want.
As for idea 1, I can invoke my app by using "start xxx.xxx" but that is as far as it goes.
What choices do I have? My application footprint is not huge. Can I do something at the external application end to dxf in using the instance of autocad that invoked the process, or can I get autocad to know when the external process has finished and dxfin the file?
Thanks.
Andy
I wrote an external Visual C++ MFC Dialogue application that creates a DXF file based on existing data files and options.
What I would like to do is one of two things:
1. Have VBA macro that executes my application, and then if it terminates with OK obtains the DXF file that was created and DXFin into current DWG file.
2. Do a ShellExecute from my external application in such a way that it will dxfin the DXF file into the running instance of Autocad.
I have looked into both and have problems. If I do a shellexecute to run acad.exe with a script to dxfin the file, it will always do a new instance of acad. If I shellexecute using the DXF as the parameter it will open the dxf in the running instance. That is half of what I want.
As for idea 1, I can invoke my app by using "start xxx.xxx" but that is as far as it goes.
What choices do I have? My application footprint is not huge. Can I do something at the external application end to dxf in using the instance of autocad that invoked the process, or can I get autocad to know when the external process has finished and dxfin the file?
Thanks.
Andy