Submitted by intonate on Tue, 11/24/2020 - 07:13
Forums:
Our modeling standard is to have several model views with logical subsets of the PMI. We also include one model view named "ALL" that should have every PMI object.
I am trying to write code to make sure every object is displayed in the ALL view.
the only option I have found so far is to get separate arrays of each specific type of annotation object:
foreach (NXOpen.Annotations.Annotation a in workPart.Annotations.Fcfs)
{//...}
foreach (NXOpen.Annotations.Annotation a in workPart.Annotations.CustomSymbols)
{//...}
etc.
is there any way to get all objects of type NXOpen.Annotations.Annotation ?
solved
I think i found the solution:
foreach(NXOpen.Annotations.Pmi p in workPart.PmiManager.Pmis.ToArray())
{
NXOpen.Annotations.Annotation a = p.GetDisplayInstances()[0];
}