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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Create a Flat Pattern feature using Creo Toolkit

GabrielPaes
5-Regular Member

Create a Flat Pattern feature using Creo Toolkit

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
GabrielPaes
5-Regular Member
(To:RPN)

Thanks for the help, I was able to figure it out on how to use the article code properly.

View solution in original post

4 REPLIES 4
RPN
17-Peridot
17-Peridot
(To:GabrielPaes)

In short, create the feature by yourself, next dump this feature to an xml file, finally create this tree by yourself.

GabrielPaes
5-Regular Member
(To:RPN)

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?

RPN
17-Peridot
17-Peridot
(To:GabrielPaes)

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
*/

GabrielPaes
5-Regular Member
(To:RPN)

Thanks for the help, I was able to figure it out on how to use the article code properly.

Top Tags