DWG TrueView

DWG TrueView

Reply
Active Contributor
bakerrl2
Posts: 30
Registered: ‎02-17-2010
Message 1 of 1 (141 Views)

Viewing a drawing using ShellExecute

141 Views, 0 Replies
09-11-2013 10:25 AM

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?

 

 

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.