How Can I get the TC Status for ItemRev from vb journaling?

I use Journaling to open ItemRev in NXM and I need to check the Status of this ItemRev to know if I can CheckIt out and save Or if it is "Released" or "Freeze" So I will revise it or exit.

I didn't find the function that get the Current Status of ItemRev.

You should be able to get the status using NXOpen.UF.UFUgmgr.AskPartRevisionID(ItemRevisionTag, RevisionStatusString)

You will need to supply the tag of the Item Revision which can be obtained using AskPartTag(ItemIDstring, partTag) then get all the revision tags with ListPartRevisions(partTag, revCountInteger, RevisionsArrayTag). Then check through the array using AskPartRevisionId(ItemRevisionTag, RevisionString) to find the correct revision string.

This method involves checking each revision until you find the one you want but you could start with the latest and work back. You may be able to use Configuration Rules to shortcut this method depending how they are set up.

Mike

Thanks, I will try it.

let say that nothing open yet and I searched and find that my ID exist in TC and I want to open the ItemRev with the Revision Rule.

What is the function that can give me the revision of ID by specific revision rule or current revision rule?

Hi,
Unfortunately the:

NXOpen.UF.UFUgmgr.AskPartRevisionID(ItemRevisionTag, RevisionStatusString)

didn't work. the "RevisionStatusString" get the Revision String and not the Status.

But I found a way to get the Status after i open the ItemRev using:

DisplayPart.PdmPart.GetReleaseStatus()

Public Function GetReleaseStatus() As String
Member of NXOpen.PDM.PdmPart

I haven't got access to integrated NX at the moment so I was just referring to my notes - sorry about the incorrect info on the revision status but it seems you have found a solution now.

To find the current revision rule use NXOpen.UF.UFUgmgr.AskConfigRule(configRuleString) and set it with NXOpen.UF.UFUgmgr.SetConfigRule(configRuleString)
You can then use NXOpen.UF.UFUgmgr.AskConfiguredRev(parttag, revtag) to find the tag of the revision.

I always set a variable to the current rule before setting a new rule so that I can reinstate the original rule.

Mike