Create an app

Create an app

Anonymous
Not applicable
1,081 Views
1 Reply
Message 1 of 2

Create an app

Anonymous
Not applicable

Hi so I have a program in C++ that can do some staff for me...

 

I want to create an app that I can run from the DWG file,

the app will activate the EXE file (the c++ program) 

The EXE file will run some staff and will return a SCR file

I want the app to run that SCR file inside the DWG file.

 

Can someone give a template for a working app so I can modify it?

maybe an app that can draw a line, something simple that surely run...

0 Likes
1,082 Views
1 Reply
Reply (1)
Message 2 of 2

norman.yuan
Mentor
Mentor

Since you are posting in VBA forum, are you looking a VBA solution that runs your EXE and then load the generated SCR file and run it?

 

It could be very simple with a one or two lines of LISP code or script macro to do. See following steps:

 

1. use AutoCAD command "SHELL" to run the exe

2. Make sure the SH/SHELL command is set to wait the external app (started with "Start" command) to its finish (done in the acad.pgp).

3. use command "Script" to run the generated script file.

 

Once you know each step, simply put them together with LISP statement, or a scrip macro. If you like to call it "app", it is a "small app". For example, the LISP code could be like (first make sure AutoCAD waits SHELL command to be completed in acad.pgp):

 

(command "SHELL" "C:\\myAppLocation\\MyApp.exe")

(command "Script" "C:\\myAppLocation\\theScript.scr")

 

(not tested!)

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes