Skip to main content
1-Visitor
August 31, 2021
Question

RegenerateRelation is not updating relation value using VB api code

  • August 31, 2021
  • 2 replies
  • 1231 views
I am using Creo Parametric 2.0 M250

RegenerateRelation api is not modifying relation value in creo2 using VB code

Here are the errors that I faced
pfcExceptions::XToolkitGeneralError
at pfcls.IpfcRelationOwner.RegenerateRelations()
at customApp.modInit.changeDateFromRelation(IpfcModel iObjModel, String strToProcess)

    2 replies

    18-Opal
    August 31, 2021

    @SK_9994711  Please make sure that the relations you are writing in the model are valid and do not have any errors. Try writing the exact same relations manually from UI and see if there are any errors. On which Object you are calling RegenerateRelations() ? is it a feature or the model ? Share your code snippet and a sample model if possible.

    18-Opal
    September 2, 2021

    The relation change made and appended to the model was successful. There were a couple of evaluation errors present in the model which was resulting in warning message "warning Probable error in function evaluation". Due to this, RegenerateRelation() was throwing exception pfcExceptions::XToolkitGeneralError.

     

    RegenerateRelation() was successful as expected when there were no relation errors or evaluation warnings present in the model relations.

     

    -Seshu