I'm working on an NXOpen Python-based dialog-box "dashboard" for managing "Specialized PMI" and "Security Marking" from a unified interface. I've started with the PartIdentification Class objects, and I'm experimenting using the NIST PMI models as subjects. It seems like when the annotation to represent the PartIdentification PMI object is displayed in the model, it has a set format, and I'd like to know if that can be altered. By format, I mean which information is displayed, in what order, with what characters around it.
Example: the NIST model file named "827-9999-903 rev c.prt" comes with a PMI object with a displayed PMI attribute object of a type of class 'NXOpen.Annotations.PartIdentification'. The below code is a snippet of code I used to extract the embedded information:
theSession = NXOpen.Session.GetSession() theUI = NXOpen.UI.GetUI() theParts = theSession.Parts theWorkPart = theParts.Work allPMIAttributeObjects = theWorkPart.PmiManager.PmiAttributes logInfoList =  for onePMIAttributeObject in allPMIAttributeObjects: whatThisIs = str(type(onePMIAttributeObject)) if whatThisIs == r"<class 'NXOpen.Annotations.PartIdentification'>": partIdentificationBuilder1 = theWorkPart.PmiManager.PmiAttributes.\ CreatePartIdentificationBuilder\ (onePMIAttributeObject) logInfoList.append('PartIdentifier: %s\nRevision: %s\n' % (partIdentificationBuilder1.PartIdentifier, partIdentificationBuilder1.Revision)) logInfoList.append('Attribute.Name: %s\nTag: %s\nTitle: %s\n' % (partIdentificationBuilder1.Attribute.Name, partIdentificationBuilder1.Tag, partIdentificationBuilder1.Title)) logInfoList.append('ItemName: %s\nItemNameModifier: %s\n DescriptiveModifier: %s\n BusinessModifier: %s\n' % (partIdentificationBuilder1.ItemName, partIdentificationBuilder1.ItemNameModifier, partIdentificationBuilder1.DescriptiveModifier, partIdentificationBuilder1.BusinessModifier)) logInfoList.append('Origin.OriginPoint.X: %s\n Origin.OriginPoint.Y: %s\n Origin.OriginPoint.Z: %s\n' % (partIdentificationBuilder1.Origin.OriginPoint.X, partIdentificationBuilder1.Origin.OriginPoint.Y, partIdentificationBuilder1.Origin.OriginPoint.Z)) partIdentificationBuilder1.Destroy() theUI.NXMessageBox.Show("Survey Embedded Annotations", \ NXOpen.NXMessageBox.DialogType.Information, \
Apologies for the width of some lines, and I'm not going to promise this snippet will run by itself!
Anyway, the result from the NIST standard model is this information:
Attribute.Name: Part Identification
Title: Part Identification
(I do believe there are errors in the NIST models just to trip us up. The Revision in the filename was "c", the revision shown in the drawing sheet in Drafting application is "B", the Revision embedded into the PartIdentification class above is "-", and NONE of those reflect the Revision I gave it in our Teamcenter database. But that isn't too important, just wanted to point out the discrepancy before someone else does.)
Okay, setting up for my question:
When this annotation is displayed on the PMI_ANNOTATION view, it shows up as:
827-9999-903.prt (-) SPACER, SHOULDERED
PartIdentifier (Revision) ItemName, ItemNameModifier
But if I don't WANT to show the Revision in parentheses, because () around something means it is for reference only, or I want to put the ItemName on a separate line, I can't figure out how to alter that.
Question: where or how can I specify a different format for the display of Specialized PMI, such as the PartIdentifier information?