You can record journals of much of the NX functionality. When you have a question about how to do something with the API, the first step is to record a journal while performing the action.
Recording a journal while turning on layer 2 yields the following relevant code:
Dim stateArray1(0) As Layer.StateInfo
stateArray1(0) = New Layer.StateInfo(2, Layer.State.Selectable)
workPart.Layers.ChangeStates(stateArray1, False)
re: hide/show specific layer
You can record journals of much of the NX functionality. When you have a question about how to do something with the API, the first step is to record a journal while performing the action.
Recording a journal while turning on layer 2 yields the following relevant code:
Dim stateArray1(0) As Layer.StateInfo
stateArray1(0) = New Layer.StateInfo(2, Layer.State.Selectable)
workPart.Layers.ChangeStates(stateArray1, False)