Skip to main content
4-Participant
December 30, 2025
Question

Adding relations to pattern in C++ toolkit

  • December 30, 2025
  • 3 replies
  • 234 views

Hello.

 

I'm trying to create a dimension pattern using C++ toolkit in Creo 8. First I created the pattern with the desired relation (MEMB_V=-LEAD_V) as shown in the image below. Then I created an element tree of the pattern and stored it in a xml file so I can use it as template for pattern element trees later.

 

However the relation is not included in the element tree. Creating the pattern with the element tree has the "Define increment by relation" still ticked, but the Relations window is empty.

 

When I check the xml file I can see that the row that should have the relation just has ** as value:

 <PRO_E_GENPAT_RELATION_EDIT type="pointer">**</PRO_E_GENPAT_RELATION_EDIT>

 

I tried to create that element and assign the relation to it by using the create function for wfcElements. The Create function needs pfcArgValue as input, but there does not seem to be a way to assign a "pointer" type value to it. C Toolkit user guide  says to assign an array of wide strings to that element, but there does not seem to be a way to assign an array either.

 

Does anyone know how to assign the value to this element?

A_Hill_0-1767106672866.png

 

3 replies

18-Opal
January 3, 2026

From Toolkit Help

 

If the increment is relation-driven, the element PRO_E_GENPAT_RELATION_EDIT contains an array of wide strings whose members are individual relations. ProArray I guess 🙂

 

------------------------------------------------------------------------------
Element Id, Element Name, Data Type Valid Values
------------------------------------------------------------------------------
PRO_E_GENPAT_RELATION_EDIT, Relation, Application (PRO_VALUE_TYPE_POINTER)


| |___ PRO_E_GENPAT_DIM_SECOND_DIR
| | |
| | |_ PRO_E_GENPAT_DIM_DIR_COMPOUND
| | |
| | |_ PRO_E_GENPAT_DIR_DIMENSION
| | |_ PRO_E_GENPAT_DIR_VAR_TYPE
| | |_ PRO_E_GENPAT_DIR_VAR_VALUE
| | |_ PRO_E_GENPAT_RELATION_EDIT


If this is not working, add the relation as an additional step. 

17-Peridot
January 7, 2026

Hello, have you tried using a pointer to ProRelset for the element value?

Community Manager
March 9, 2026

Hi @A_Hill,

 

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.
Of course, if you have more to share on your issue, please pursue the conversation.

 

Thanks,
Anurag