cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

XToolkitObsoleteFunc with C++ otk in Creo 9.0.0.0 for pfcComponentFeat::GetModelDescr()

PAULR_UK
6-Contributor

XToolkitObsoleteFunc with C++ otk in Creo 9.0.0.0 for pfcComponentFeat::GetModelDescr()

I am attempting to get a c++ otk creo adding to work with Creo 9.0.0.0. I have the plugin working in 8.0.0.0 and 8.0.3.0 with the following code:

[ I should note that I have used the 8.0.0.0 otk libs to build against as that was the original target version - my issue may just be that I have to build against 9.0.0.0 protk and otk libraries - I will try that if that is confirmed to be the case]

 

pfcFeature_ptr childFp = childFeatures->get(i);
pfcComponentFeat_ptr compPtr = pfcComponentFeat::cast(childFp);
pfcModelDescriptor_ptr mdlPartInstDesc = compPtr->GetModelDescr(); <== exception thrown here

 

and ultimately I need to obtain the child model using the Model Descriptor and the current session

pfcModel_ptr childMdl = currentSession->RetrieveModel(mdlPartInstDesc);

 

However I get an exception pfcExceptions::XToolkitObsoleteFunc
{
Message : "pfcExceptions::XToolkitObsoleteFunc"
MethodName : "pfcModel::Model::Descr<get>"
ToolkitFunctionName : "ProMdlDataGet"
}

thrown when I call compPtr->GetModelDescr(). I do not see this function listed as obsolete in /PTC/Creo 9.0.0.0/Common Files/otk_cpp_doc/Otk_Cxx_RelNotes.pdf

ACCEPTED SOLUTION

Accepted Solutions

Hi Paul

 

ProMdlDataGet is TK and it is obsolete. So it gets automatically replaced by using the new 9.0 sources.

 

Eike_Hauptmann_0-1661941988406.png

 

So yes, you need to get the Creo 9.0 sources and build against them.

 

Br,

Eike

 

View solution in original post

2 REPLIES 2

Hi Paul

 

ProMdlDataGet is TK and it is obsolete. So it gets automatically replaced by using the new 9.0 sources.

 

Eike_Hauptmann_0-1661941988406.png

 

So yes, you need to get the Creo 9.0 sources and build against them.

 

Br,

Eike

 

Thanks Eike for your prompt reply

Announcements


Top Tags