Skip to main content
13-Aquamarine
March 25, 2024
Solved

ProFeatureReferenceEdit() API returns PRO_TK_BAD_INPUTS

  • March 25, 2024
  • 1 reply
  • 1261 views

Dear friends,

 

I created a new csys which I want to redefine the reference. ProFeatureReferenceEdit needs old & new references in form of array. but I have only one old and new reference. 

 

Any possibility to convert one reference to array format? Any suggestions are welcome

 

status = ProFeatureCreate(input_destmdlSel, pro_e_feature_tree, opts, 1, &feature, &errors);
status = ProElementFree(&pro_e_feature_tree);

status = ProFeatureReferenceEdit((ProSolid)newmdl, &feature, &cSysRef, &cSysRef_2, PRO_REGEN_FORCE_REGEN);

 

 

 

Best answer by FV_01

if a question would be rephrased in terms of how to add something to an array instead of how to convert...  - the answer would be quite obvious:

use ProArrayAlloc(...) followed by ProArrayObjectAdd(...)

HIH

 

1 reply

FV_0117-PeridotAnswer
March 25, 2024

if a question would be rephrased in terms of how to add something to an array instead of how to convert...  - the answer would be quite obvious:

use ProArrayAlloc(...) followed by ProArrayObjectAdd(...)

HIH

 

13-Aquamarine
March 26, 2024
Thanks, i manually added one reference into empty array, its working
 
ProReference *oldref;
status = ProArrayAlloc(1, sizeof(ProReference), 1, (ProArray*)& oldref);
oldref[0] = cSysRef;
 
ProReference *newref;
status = ProArrayAlloc(1, sizeof(ProReference), 1, (ProArray*)& newref);
newref[0] = cSysRef_2;
 
status = ProFeatureReferenceEdit((ProSolid)newmdl, &feature, oldref, newref, PRO_REGEN_FORCE_REGEN);