Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hi all,
Mark,
I think the trick is to get a converted pointer to ProModelitem.
Try this:
pfcModel_ptr pMdl = Session->GetCurrentModel();
if (pMdl != NULL)
{
const ProSolid solid = (ProSolid) wfcGetHandleFromObject( pfcObject::cast(pMdl));
}
pfcModelitem_ptr pMi;
....
const ProModelitem *p_mi = (ProModelitem*) wfcGetHandleFromObject( pfcObject::cast(pMi) );
Feliks.
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
parent pfcModel_ptr.
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 |+|
Mark Stallard
Business Application Services
Global Business Services Information Technology
Raytheon Company
(business)
339-645-6423
(cell)
617-331-5443
-
235 Presidential Way
Woburn, MA 01801-1060
www.raytheon.com
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.