Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
I am trying to get the color of surface after selecting it with a selection pointer as described in the toolkit user guide. It appears that the information resides wfcAppearance which is extracted from wfcWSelection.
pfcSelection_ptr selSurface = pfcCreateModelItemSelection(pfcModelItem::cast(surfaces->get(0)));
wfcWSelection_ptr wselSurface = wfcWSelection::cast(selSurface);
if (wselSurface->GetVisibleAppearance().isnull())
cout << "Error: wfcAppearance nullptr" << endl;
but GetVisibleAppearance() is returning a nullptr.
However, when I select a surface using user selection process by directly clicking on it after invoking session->select(), I am able to get wfcAppearance where i can access surface properties including its color.
Can anyone please help why is GetVisibleAppearance() returning nullptr from pfcSelection_ptr when selecting a surface programmatically using pfcCreateModelItemSelection() instead of clicking on it?
If there is any other way I will appreciate it as well. Thank you.
Creo 4.0 M150
Toolkit C++
Solved! Go to Solution.
Hi @CS_11420818,
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution. It will help other members who may have the same question.
Please note that industry experts also review the replies and may eventually accept one of them as solution on your behalf.
Of course, if you have more to share on your issue, please pursue the conversation.
Thanks,