DWG TrueView

Reply
Contributor
Posts: 14
Registered: ‎02-17-2010
Message 1 of 1 (113 Views)

Viewing a drawing using ShellExecute

113 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?

 

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you interested in helping shape the Autodesk Community?
We’re looking at a few different ways to improve the “All Forums” landing page and need your feedback! If interested, please take a few minutes to fill out the following Usability Study. Thank you for your time!

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community