查看单个帖子
旧 2007-09-03, 11:50 PM   #1
huangyhg
超级版主
 
huangyhg的头像
 
注册日期: 04-03
帖子: 18592
精华: 36
现金: 249466 标准币
资产: 1080358888 标准币
huangyhg 向着好的方向发展
默认 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
__________________
借用达朗贝尔的名言:前进吧,你会得到信心!
[url="http://www.dimcax.com"]几何尺寸与公差标准[/url]
huangyhg离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)