AnsweredAssumed Answered

Using OpenDoc method with eDrawings ActiveX in LabVIEW.  Makes LabVIEW freeze.

Question asked by James Yarrington on Oct 12, 2012
Latest reply on Oct 15, 2012 by James Yarrington

I am having trouble with IEModelView: OpenDoc

 

Arguments:

 

FileName - C:\etc... filepath datatype converted to string datatype.

IsTemp - False

PromptToSave - False

ReadOnly - False

CommandString - (I've wired an empty string to this

 

For my application I need to print certain drawings (programmatically) from a shared drive.  Most of these drawings are .DWG or .pdf.  However, there are some drawings in the .SLDDRW format.  I downloaded the free eDrawings 2012 from Solidworks in order to achieve this, but I've been running into problems with the OpenDoc method.

 

When LabVIEW gets to the invoke node, it "hangs," - it doesn't execute further and the VI cannot be stopped (I usually have to force-quit it with Ctrl-Alt-Del).  In my code I have 30 s time delays (probably not necessary, was just making sure that eDrawings had time to finish the command) and "<Insert Your Printer Here>" as the printer name - obviously replace with your own printer's name - not that it matters because the execution does not reach that far in the code.

 

I've already posted this question on the LabVIEW forums:

http://forums.ni.com/t5/LabVIEW/How-do-I-get-the-OpenDoc-Solidworks-ActiveX-method-to-work-in/td-p/2185784

 

The API for this method is here:

http://help.solidworks.com/2011/English/api/emodelapi/eDrawings.Interop.EModelViewControl~eDrawings....

 

I'm running LabVIEW 2010 and eDrawings 2012 on Windows XP.

 

Thank you for your help!

James

Outcomes