cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

ProFeatureReferenceEdit() API returns PRO_TK_BAD_INPUTS

VA_3544793
13-Aquamarine

ProFeatureReferenceEdit() API returns PRO_TK_BAD_INPUTS

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);

 

 

 

ACCEPTED SOLUTION

Accepted Solutions
FV
17-Peridot
17-Peridot
(To:VA_3544793)

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

 

View solution in original post

2 REPLIES 2
FV
17-Peridot
17-Peridot
(To:VA_3544793)

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

 

VA_3544793
13-Aquamarine
(To:FV)

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);
Announcements


Top Tags