几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   SolidWorks二次开发 (http://www.dimcax.com/hust/forumdisplay.php?f=111)
-   -   1-376578723 - How to make SW running in the backgrond and invisible? (http://www.dimcax.com/hust/showthread.php?t=1397)

huangyhg 2007-09-03 11:50 PM

1-376578723 - How to make SW running in the backgrond and invisible?
 
> 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

huangyhg 2007-09-03 11:51 PM

回复: 1-376578723 - How to make SW running in the backgrond and invisible?
 
> Please have a look at the property:
>
> SldWorks::UserControlBackground
>
> This property gets and sets whether the user has control over the application. Setting this property to TRUE causes the SolidWorks application to run in the background and not be visible.
>
> Regards,
> Pabitra

huangyhg 2007-09-03 11:52 PM

回复: 1-376578723 - How to make SW running in the backgrond and invisible?
 
Hi,
If SW application is not visible, in other words, SW application runs in the background, SW DCI will import or convert rapidly.Why?
Code as follows:
// SW is not visible
SLDWORKS->SetVisible(FALSE );
yanhua

huangyhg 2007-09-03 11:53 PM

回复: 1-376578723 - How to make SW running in the backgrond and invisible?
 
Dear Yanhua,

In broader perspective, it purely depends upon the type of application you are working on. Suppose if your application is related to the Rendering etc, the work will be faster (may be) otherwise it won’t make much difference. This is because SW still consumes the same memory as it would have taken when SetVisibile(True) is set.

Thanks,
Pabitra


所有的时间均为北京时间。 现在的时间是 11:09 PM.