Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hello,
I am trying to create a Toolkit in C/C++ that creates the flat Pattern feature for a Creo sheetmetal part.
I tried using the method ProFeatureWithoptionsCreate() described on this article: https://www.ptc.com/en/support/article/CS69107?source=search
But I wasn't able to figure it out what is needed for this method to work.
Solved! Go to Solution.
Thanks for the help, I was able to figure it out on how to use the article code properly.
In short, create the feature by yourself, next dump this feature to an xml file, finally create this tree by yourself.
I am trying to create the feature using the ProFeatureWithoptionsCreate() but I can't make it work yet, maybe because of some wrong parameters.
But what do you mean by dumping the feature to an xml file?
Here the Feature Dump, you can as well create a feature from xml, and in generell it may easier to create the feature with an UDF, because a flat pattern is a simple feature.
extern ProError ProElemtreeWrite (
ProElement elemtree,
ProElemtreeFormat format,
ProPath output_file
);
/*
Purpose:
Writes the Element Tree in the specified file in XML format
Input Arguments:
elemtree - root element of the element tree to be printed
format - pass PRO_ELEMTREE_XML
output_file - Full path to the output file,
including extension.
Output Arguments:
none
Return Values:
PRO_TK_NO_ERROR - Successful in writing the element tree
PRO_TK_BAD_INPUTS - Invalid inputs
PRO_TK_GENERAL_ERROR - Errors in generating the output
*/
Thanks for the help, I was able to figure it out on how to use the article code properly.