Skip to main content
1-Visitor
Sep 15, 2021 5:03 AM UTC
Solved

Getting XToolkitGeneralError exception on executing SetConstraints() API of ComponentFeat in JLink

I am using Creo Parametric 7.0 7.0.4.0

I am trying to delete the component along with its related children, but before deleting them i am saving all the constraints of parent and child.
After deleting the components I am assembling new component and applying the same restored constraints.I am able to apply the constraints to parent but not able to set for child, it throws XToolkitGeneralError exception.

Here are the errors that I faced
Unable to set constraints to the componentFeat.
Getting XToolkitGeneralError exception on executing SetConstraints() API of ComponentFeat in JLink

Seshu Gudla
18-Opal
Sep 15, 2021 11:12 AM UTC

Hello @Priyanka_B,

 

Constraints extracted before deleting the components will be come invalid after deleting the components. These constraints cannot be reused 'as is' as the components paths and the component references of the newly assembled components will not be same.

 

One could extract the information like component location / position, which surface and what type of constraint is applied and then use this information to re-create the constraints for the newly assembled components. I hope this clarifies.

 

Thanks,

Seshu

1 reply

Seshu Gudla
18-Opal
Sep 15, 2021 11:12 AM UTC

Hello @Priyanka_B,

 

Constraints extracted before deleting the components will be come invalid after deleting the components. These constraints cannot be reused 'as is' as the components paths and the component references of the newly assembled components will not be same.

 

One could extract the information like component location / position, which surface and what type of constraint is applied and then use this information to re-create the constraints for the newly assembled components. I hope this clarifies.

 

Thanks,

Seshu

Translate