Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
CODE:
var assembly
function udfInPart()
{
session = pfcGetProESession ();
assembly = session.CurrentModel;
var part = session.GetModel ("60606060-000.PRT", pfcCreate("pfcModelType").MDL_PART);
// =========================================================================================================
var ids = pfcCreate ("intseq");
ids.Append( 0 );
var path = pfcCreate ("MpfcAssembly").CreateComponentPath ( assembly , ids );
// =========================================================================================================
var items = assembly.GetItemByName( pfcCreate("pfcModelItemType").ITEM_COORD_SYS, 'ACS_TOOL' );
// =========================================================================================================
var sysRef = pfcCreate("MpfcSelect").CreateModelItemSelection (items, null);
// =========================================================================================================
var Ref1 = pfcCreate("pfcUDFReference").Create("ACS_TOOL", sysRef);
Ref1.IsExternal = true;
// =========================================================================================================
var Refs = pfcCreate("pfcUDFReferences");
Refs.Append (Ref1);
// =========================================================================================================
var UDFInsts = pfcCreate("pfcUDFCustomCreateInstructions").Create("test_udf");
UDFInsts.References = Refs;
var NewUDF = crvSet.CreateUDFGroup(UDFInsts);
}
Sorry, first post was too fast
Hello PTC communtiy,
i need help according an issue using weblink/jlink for placing an udf in an part (with references from the assembly), which is an member of an assembly (root).
Everything works fine so far, i can place different udf's in the part using weblink.
But as soon as i want to edit the feature (after placing) i get an prompt that Pro/E is missing the external references.
How can i solve this issue? I have tried different things, but i still get the same failure all the time.
When i place the udf's direct in the assembly, everythings just fine and there is no "external references missing" prompt.
I have attatched a picture for you, to expalin the modell structure.
The weblink code is shown above
Thank you very much for any advices in advance.
Berst regards.
Markus
Hi,
if your company has active Global Support at PTC, then I suggest you to open Case at PTC Support.
MH