几何尺寸与公差论坛

 找回密码
 注册
查看: 2726|回复: 3

1-376578723 - How to make SW running in the backgrond and invisible?

[复制链接]
发表于 2007-9-3 23:50:56 | 显示全部楼层 |阅读模式
> 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
 楼主| 发表于 2007-9-3 23:51:55 | 显示全部楼层

回复: 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
 楼主| 发表于 2007-9-3 23:52:12 | 显示全部楼层

回复: 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
 楼主| 发表于 2007-9-3 23:53:00 | 显示全部楼层

回复: 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
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-22 23:36 , Processed in 0.038059 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表