How to change layer for DraftingSurfaceFinish objects

Hi, NXJournaling! Thank you very match for you helpfull page!
I need help again.. Look it please.

for example, to change the layer of curves we use the code

        'create list variable for curves objects
        Dim mycurves As List(Of curve) = New List(Of curve)
        For Each curve As curve In workPart.curves
        workPart.Layers.MoveDisplayableObjects(8, mycurves.ToArray)

but for NXOpen.Annotations. objects.. it does not work.
Can you show example to change layer for all NXOpen.Annotations.DraftingSurfaceFinish objects in workpart?

The .MoveDisplayableObjects method should operate on drafting surface finish objects. If it does not, it may be a bug in the software. Please report it to GTAC so they can investigate and fix it as necessary.

The .MoveDisplayableObjects method works, i meen that i dont know, how to form the List of drafting surface finish objects, or find each drafting surface finish.
I cant write this:

For Each DraftingSurfaceFinish As DraftingSurfaceFinish In workPart.DraftingSurfaceFinishes

because DraftingSurfaceFinishes is not a collection, and is not a member of Part

The drafting surface finish symbol collection is a child of the .Annotations collection.


Wow, so simple! Now I see.. I couldn't find this in the documentation, until you helped me. The query for the phrase "DraftingSurfaceFinish collection" led me to the DraftingSurfaceFinishCollection page where "DraftingSurfaceFinishSymbols" is not mentioned.
Did you look documentation, or record the journal?
Now I understood where to look in the journal, and found, that, for example, for PMI SurfaceFinish:


But I do not know how could to find it with documentation only.
Thank you so much for light in the nighty fog! =)

I looked in the documentation to find the appropriate collection. From past experience, I know that most of the drafting note objects can be found through the part's .Annotations collection. In the .net reference file, I entered "part" in the index to get to the NX part object. From there I clicked on the .Annotations link to browse through what was available there.

If you are looking for a collection of a specific type of object, the NX Part class is a great starting point.