TK / OTK - Copy and rename assembly in memory (Reference issue)
Hi I rename all models inside a model to new names. After that I have some problems with references. So external references get not updated.
Now I try to use ProFeatureReferenceEdit to edit these references. But I didn't get it.
I didn't get him to another return value than -2 (BAD INPUTS), anyone have an idea how to get it?
My current code sniplet looks like this:
writeLog("5.0", 0);
ProFeature feat;
ProSolid solid = (ProSolid)wfcGetHandleFromObject(pfcSolid::cast(mdl));
if (ProFeatureInit((ProSolid)wfcGetHandleFromObject(pfcSolid::cast(mdl)), 68, &feat) != PRO_TK_NO_ERROR) writeLog("here 55");
writeLog("5.2", 0);
ProError status;
if (ProArrayAlloc(1, sizeof(ProReference), 1, (ProArray*)&old_refs) != PRO_TK_NO_ERROR) writeLog("here 1", 0);
if (ProArrayAlloc(1, sizeof(ProReference), 1, (ProArray*)&new_refs) != PRO_TK_NO_ERROR) writeLog("here 2", 0);
if ((status = ProFeatureReferenceEdit(solid, &feat, old_refs, new_refs, NULL)) != PRO_TK_NO_ERROR) writeLog("failure while change: " + convertInt(status), 0);
writeLog("5.3", 0);
Br and Thanks,
Eike
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

