DWG TrueView
Welcome to Autodesk’s DWG Trueview Forums. Share your knowledge, ask questions, and explore popular DWG Trueview topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Viewing a drawing using ShellExecute

0 REPLIES 0
Reply
Message 1 of 1
bakerrl2
473 Views, 0 Replies

Viewing a drawing using ShellExecute

We have a drawing control program that allows a user to view a drawing file using the program associated with the DWG extension on the PC.  In this case the program associated with the DWG extension is DWG TrueView 2014.  To lauch the program we use the ShellExecute function to execute the selected the drawing file which causes Windows to launch the program associated with DWG extension.  Here is the function call we use.

 

HINSTANCE hInst = ShellExecute(NULL, szOperation, szDocName, NULL, NULL, nShowCmd);

 

Where

  Operation = "open"

  szDocName = drawing filename

  nShowCmd = SW_SHOW

 

Using ths function Windows launches the DWG TrueView 2014 program; however, DWG TrueView generates an error message indicating that is can't load the AcSceneOE.dbx file in the calling program's directory which is understandable because the drawing control program does not have the DWG TrueView files.

 

The ShellExecute function does provide a way to specified the default working directory but at the time the function is called we have not idea what that directory may be because we don't know what program is associated with the DWG extension.

 

Note: If AutoCAD is associated with DWG, we have no problems.

 

Is there anyway to get DWG TrueView to look for its files in its own directory instead of the currect working directroy?

 

 

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report