|
> Subject: How to make SW running in the backgrond and invisible?
>
> Hi,
> Are there other ways to rapidly get model doc from ISldWorks? According to the below steps, it takes a long time to get model doc via the following code. I guess the reason of that m_pSldWorks open filename in SW if SW is running in the foreground and is visible. But our requirement is that SW translator reads or gets majority model data or information of SW 3D part via OLE Automation and SW 3D part doesn’t need display in SW.
> My code as follows:
> // code 3 start
> // Get the pModelDoc - Open the SolidWorks file
> dModelDoc = m_pSldWorks.OpenDoc6 (fileName, fileType, fileOptions, fileConfigs, &errors, &warnings);
> dModelDoc = m_pSldWorks.ActivateDoc2 (fileName, silent, &errors);
> // get the active model doc
> LPDISPATCH dModelDoc = m_pSldWorks.GetActiveDoc();
> // code 3 end |
|