Invoking / communicating with external applications

Invoking / communicating with external applications

Anonymous
Not applicable
339 Views
3 Replies
Message 1 of 4

Invoking / communicating with external applications

Anonymous
Not applicable
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
0 Likes
340 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Why not just make your MFC app a COM server?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

wrote in message news:5868111@discussion.autodesk.com...
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
0 Likes
Message 3 of 4

Anonymous
Not applicable
Would you ming explaining to me how you do that? I have written visual c++ projects that communication via com with other applications, like Word, but I have not done what you suggest.

Andrew
0 Likes
Message 4 of 4

Anonymous
Not applicable
I would suggest you visit the Microsoft Visual C++ newsgroup to get help on that, and also explore the samples available both on- and off-line.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

wrote in message news:5868051@discussion.autodesk.com...
Would you ming explaining to me how you do that? I have written visual c++ projects that communication via com with other applications, like Word, but I have not done what you suggest.

Andrew
0 Likes