查看单个帖子
旧 2007-09-04, 12:51 PM   #2
huangyhg
超级版主
 
huangyhg的头像
 
注册日期: 04-03
帖子: 18592
精华: 36
现金: 249466 标准币
资产: 1080358888 标准币
huangyhg 向着好的方向发展
默认 回复: there are three terrible questions on SW translator as below

Hello Yanhua,

To answer your questions:

1 - You should be able to use ::GetActiveObject to obtain the currently running SW session. Once you have the IUnknown pointer, you can use the AttachDispatch to attach it to your ISldWorks object.

2 - I believe that I have responded to this item separately today.

3 - If you look at the three calls: OpenDoc6, ActivateDoc2 and GetActiveDoc all three of them are returning a document object. Thus, you only need one of them. It is true that the macro recorder records all three, but you do not need to make these calls when working with your code.


Regards,
Earl Hasz
__________________
借用达朗贝尔的名言:前进吧,你会得到信心!
[url="http://www.dimcax.com"]几何尺寸与公差标准[/url]
huangyhg离线中   回复时引用此帖