I think the trick is to get a converted pointer to ProModelitem.
pfcModel_ptr pMdl = Session->GetCurrentModel();
if (pMdl != NULL)
const ProSolid solid = (ProSolid) wfcGetHandleFromObject( pfcObject::cast(pMdl));
const ProModelitem *p_mi = (ProModelitem*) wfcGetHandleFromObject( pfcObject::cast(pMi) );
In Reply to Mark Stallard:
Hi Everyone -
I've been working with the new Object Toolkit on Creo 2.0 these
past few weeks. Things have been OK so far, but I'm discovering
something that's much harder than it should be: Converting OTK
objects for use in Pro/Toolkit.
So far, the two standout cases are:
- Converting pfcModelItem_ptr to ProModelitem
- Converting pfcModel_ptr to ProMdl
Getting ProModelitem from pfcModelItem_ptr is especially bad
because ProModelitemInit (and its variants) require a ProMdl
argument. I can't find a pfcModelItem_ptr method to get the
I think I see a path to convert pfcModel_ptr to ProMdl, but
it will probably be more complicated than I like.
Did I miss something in the OTK documentation?
If I can't get a reasonable solution to these problems, then
I'll won't be using Object Toolkit very much this year.
|+| M a r k |+|
Business Application Services
Global Business Services Information Technology
235 Presidential Way
Woburn, MA 01801-1060
This message contains information that may be confidential and privileged.
Unless you are the addressee (or authorized to receive mail for the
addressee), you should not use, copy or disclose to anyone this message or
any information contained in this message. If you have received this message
in error, please so advise the sender by reply e-mail and delete this
message. Thank you for your cooperation.