几何尺寸与公差论坛

 找回密码
 注册
查看: 724|回复: 0

【转帖】problem for getting coordinate system axes components

[复制链接]
发表于 2009-4-13 13:34:21 | 显示全部楼层 |阅读模式
problem for getting coordinate system axes components
hello,
first, thanks for reading this message.
i use solidworks 2006 and its api.
i'd like to get 3 axes components of an user-defined coordinate system.
this coordinate system is made by the function of 'reference geometry'.
this coordinate system is included in a 'part'.
i succeeded to get the 'reference geometry' feature object.
1) different from 'refaxis' or 'refpoint', i don't know how to get the specific feature for 'coordsys' object.
i could know whether a feature is 'coordsys' or not by using 'feature->gettypename' function.
so, i got the interface of 'coordsys' object in the form of
'ccomptr'.
'refaxis' or 'refpoint' objects can be accessed in the form of
'ccomptr' or 'ccomptr'.
i don't know the difference between them.
i could not find it in the help file.
2) so, i defined a function to get the components of a coordinate
system.

variant_bool cswassembly::get_coordinatesystemtransform(ccombstr
bstrcoordsysname, ccomptr& pmathtransform)
{
hresult hres ;
ihres = m_swmodeldocext->getcoordinatesystemtransformbyname(bstrcoordsysname,
&pmathtransform);
return hres;
}

because, i found the function 'getcoordinatesystemtransformbyname'.
aforementioned, i got the name of 'coordsys' type feature. so i
thought that i could use the function 'getcoordinatesystemtransformbyname'.
but, the return value, 'pmathtransform' does not include any
information at all.
i'm not good at solidworks api.
please give me your advice. thanks in advance.
sincerely
moonki jung
edited: 10/20/2008 at 10:09 pm by moonki jung
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-23 08:57 , Processed in 0.033006 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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