Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to launch a Cad drawing file but it is launching only the application Progecad and not its drawing. I'm working in VC++

What I have tried:

<pre lang="c++"> ShellExecute(NULL, "open", "C:\\Program Files\\PSOFT\\progeCAD 2019 Professional ENG\\pcad.exe",""C:\Users\Max\Desktop\cad link trial.dxf", NULL, SW_SHOW);


It is just opening ProgeCad and not the drawing. Whats wrong?
also tried to give path name as
"C:\\Users\\Max\\Desktop\\cad link trial.dxf"

but it doesn't work.
Posted
Updated 7-Nov-19 5:50am
v2

1 solution

The first example above will fail because it is badly formed (single \, double double quotes ...). The second string is correct, but you need to be sure that this program accepts a filename and automatically opens it. Try the following in a command window:
"C:\Program Files\PSOFT\progeCAD 2019 Professional ENG\pcad.exe" "C:\Users\Max\Desktop\cad link trial.dxf"

Type all the above text on the same line separated by a space, not as two lines.

Note also, in this case you need single backslash characters, and you do need the double quotes around both strings.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900