|
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 |
|