Showing results for 
Search instead for 
Do you mean 
Solved! Go to solution

How to get the Journalidentifier (alternative) in c#

[ Edited ]

Hi all,


i created a code with the journal and get this line.


NXOpen.Features.DatumCsys datumCsys1 = (NXOpen.Features.DatumCsys)workPart.Features.FindObject("journalidentifier")


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 !



Re: How to get the Journalidentifier (alternative) in c#

ok i figured out the first question.

First i created a NXObject with the NXObjectManager and the Tag of the TaggedObject.
With this NXObject you can use the journalidentifier and save the Name in a string.

But are their alternatives to FindObject () ?
Accepted by topic author Ildon
‎06-08-2016 05:36 AM

Re: How to get the Journalidentifier (alternative) in c#

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



Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)

Re: How to get the Journalidentifier (alternative) in c#

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".

Re: How to get the Journalidentifier (alternative) in c#

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.