Fellow API Enthusiasts:
I have a simple file open macro that I am writing. Some of our files are DWG files and some are SLDDRWs. Opening a SLDDRW is no problem. What I want to do is, if a DWG file is found in the directory, I want to be able to show the drawing in DWGEditor. Here is an excerpt of what I have:
Public DWGEd As DWGEditor.Application
Public DWGDoc as DWGEditor.Document
Sub OK_Click()
Set swApp = Application.SldWorks
Set DWGEd = CreateObject("DWGEditor.Application")
Set DWGDoc = DWGEd.Documents.Open(dDir, False)
End Sub
However, I can't seem to get DWGEditor to show. If I bring up the Task Manager, it shows as an active process (though not visible on the applications tab), but it is not accessible. Anyone have any idea on how to begin DWGEditor from Solidworks API and load a document from said macro?
Thanks!
SolidworksApi macros