how to get child name of datum coordinate system if child is sketch

Hi

below is code which is editid from one of the code which is available from this site, it is working fine as follows

1. listing nomber of childs of Datum coordinate system
2. displaying names of child, if child is datum axis etc

But not displaying name of sketch which is child of datum coordinates system

below is code, can you please help to resolve the above issue

Option Strict Off
Imports System
Imports System.Collections.Generic
Imports NXOpen
Imports NXOpen.UF

Module Module1

Sub Main()

Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
Dim workPart As NXOpen.Part = theSession.Parts.Work
Dim displayPart As NXOpen.Part = theSession.Parts.Display
Dim lw As ListingWindow = theSession.ListingWindow

lw.Open()

Dim datumCsys1 As NXOpen.Features.DatumCsys = CType(workPart.Features.FindObject("DATUM_CSYS(0)"), NXOpen.Features.DatumCsys)

Dim i As Integer = datumCsys1.GetChildren.Length

lw.WriteLine("Nomber of DCS Childs = " & i)

Dim Dcs_childs As NXOpen.Features.Feature()
Dcs_childs = datumCsys1.GetChildren()

For Each temp As NXOpen.Features.Feature In Dcs_childs
lw.WriteLine(temp.Name)
lw.WriteLine(temp.GetFeatureName)
Next

End Sub

End Module

What version of NX are you using? Older versions have a "create intermediate sketch csys" option, newer versions will do this automatically. If you are using this option (or a newer version of NX), a hidden datum csys will be created that is the parent of the sketch.

Hi
Thanks for reply,
I am using NX11,
In newer version how to get these sketch names, can you please help me to resolve above issue
Thanks

Try right clicking on the sketch and using "make datums external". Now when you select the sketch in the part navigator, you will see the parent datum csys highlighted (DATUM_CSYS(0) is not the true parent of the sketch).