Skip to main content
Oct 15, 2025 12:25 PM UTC
Acknowledged

Pro/TOOLKIT: Enable Adding Varied Items to an Already Flexible Assembly Component

Related products:Creo Parametric

1. Describe the Problem

The current Pro/TOOLKIT API lacks an essential capability related to flexible assembly components — it is not possible to add new varied items to a component that is already flexible.

At the moment, this can only be achieved through complex workarounds, and even then, only partially.
To add a varied item using Toolkit, the existing flexibility must first be removed and then re-applied via ProAsmcompFlexibleUnset() and ProAsmcompFlexibleSet(), passing all previously defined varied items (ProParameter, ProFeature, ProDimension, ProGtol, ProSurfFinish, and ProMaterialItem) along with the new one.

This approach introduces multiple issues:

  • Existing varied items are lost when flexibility is unset, so they and their corresponding new values must first be collected using visitor functions before unsetting flexibility.
  • After resetting flexibility, the new values are not automatically restored, requiring another iteration to manually reassign them.
  • Varied materials (ProMaterialItem) cannot be retrieved through Toolkit — ProVariantfeatItemsVisit() does not visit model items of type ProMaterialItem. As a result, flexible materials and their values are permanently lost, and there is no way to determine whether they existed in the first place.

This significantly limits automation and increases the risk of data inconsistency or loss during Toolkit-driven operations.


2. Are you using a workaround?
A partial workaround exists but does not cover all use cases and carries the risk of losing flexible material information, making it unreliable.

 

The workaround is based on the approach from PTC article CS316199, which involves:

1. Visiting and storing all varied items using ProVariantfeatParamsVisit() and ProVariantfeatItemsVisit().

2. Unsetting flexibility with ProAsmcompFlexibleUnset().

3. Reapplying flexibility using ProAsmcompFlexibleSet(), passing the previously stored varied items.

 

However:

- The varied items are preserved, but their new values are lost.

- To restore values, the additional steps from article CS454875 must be implemented — visiting and storing all varied items and their new values before unsetting flexibility, and then manually reapplying those values after resetting it.

- Even after following all of the above, varied materials remain unrecoverable, as ProVariantfeatItemsVisit() does not recognize model items of type ProMaterialItem (see article CS453209).

 

Thus, even the most comprehensive workaround fails to fully replicate the native Creo Parametric behavior.

3. What is the use case for your organization?
In Creo Parametric, flexible components can only be defined individually through the user interface, requiring significant manual effort when multiple components must be configured similarly.

 

Our organization is developing a Toolkit-driven automation that allows users to select multiple assembly components (flexible or non-flexible) and apply flexibility in a single operation.

 

The tool automatically:

- Adds a predefined flexible parameter to each selected component, and

- Sets its desired flexible (new) value.

 

This automation saves significant time for developers, particularly in assemblies containing numerous components. However, due to the current Toolkit limitation, we cannot reliably modify or extend flexibility for already flexible components — especially when varied materials are involved.

4. What impact does this problem currently have on your organization?
Approximately 200 users in our organization are affected by this limitation.

 

In Creo Parametric’s UI, adding a varied parameter and assigning its value to an already flexible component typically takes around 10 seconds per component. In many real-world use cases, developers need to apply this operation to 30–40 components at once, which translates to 5–7 minutes of repetitive manual work.

 

Our planned Toolkit automation would perform the same operation for all selected components in about 10 seconds total. This means a time saving of roughly 5–7 minutes per operation, per user. Given that this task is performed daily across multiple projects and users, the cumulative time saving would reach dozens of developer-hours per week, significantly improving productivity and reducing manual errors.

1 reply

Community Manager
Oct 16, 2025 8:46 AM UTC
Status changed to: Acknowledged

Thank you @EI_9983441 for your idea. Based on the information you provided, we are acknowledging it as the Community management team. This is not a commitment from the Product team. Other users may comment and vote your idea up.