-
1
- #1
niedzviedz
Mechanical
- Apr 1, 2012
- 307
Hello everyone,
Is there a simple way to move DatumFeature to specific layer? Right now I created something based on recorded journal:
DatumFeature doesn't have DatumPlane.Layer or Layer properties.
With best regards
Michael
Is there a simple way to move DatumFeature to specific layer? Right now I created something based on recorded journal:
Code:
For Each myFeature As Feature In workPart.Features
If TypeOf (myFeature) Is DatumPlaneFeature Then
Dim myDatum as Features.DatumPlaneFeature = myFeature
myDatum.DatumPlane.Layer = DatumLayer
myDatum.DatumPlane.RedisplayObject
ElseIf TypeOf (myFeature) Is DatumFeature Then
Dim objectArray1(0) As NXOpen.DisplayableObject
Dim datumPlane1 As NXOpen.DatumPlane
datumPlane1 = CType(workPart.Datums.FindObject(myFeature.GetFeatureName), NXOpen.DatumPlane)
objectArray1(0) = datumPlane1
workPart.Layers.MoveDisplayableObjects(DatumLayer, objectArray1)
End If
DatumFeature doesn't have DatumPlane.Layer or Layer properties.
With best regards
Michael