i created a code with the journal and get this line.
NXOpen.Features.DatumCsys datumCsys1 = (NXOpen.Features.DatumCsys)workPart.Features.FindO
So if i have a Feature as Tagged Object, how do i get the journalidentifier ?
Is ther an alternative function to FindObject. So you could use the Featurename or the taggedObject or Tag instead of the journalidentifier ?
Thanks for the help !
Solved! Go to Solution.
alternatives to FindObject(): how about looping through all the objects of interest (csys in our case I think) and check for a "criteria" such as name. If criteria is met then exit the loop?
depending on the code you are writing FindObject() is actually quite good if you are 100% sure that what you are looking for is there (and will always be there). Can always put the FindObject() in a Try ...Catch loop
This topic is covered pretty well in the NXOpen Programmer's Guide - way too much information to paste in here.
Search in the Programming Tools docs for "Removing Selection Stickiness" and "Replacing FindObject() calls".
The NX docs often refer to this issue as the "journal stickiness problem", so you can find helpful material by searching for that term.
And it's also covered in the "Getting Started with SNAP" guide. See the section entitled "The FindObject Problem" in chapter 16.