Dim oMainFace As FaceProxy = InvApp.CommandManager.Pick(SelectionFilterEnum.kPartFaceFilter, "Выберите плоскость")
If IsNothing(oMainFace) Then Exit Sub
Dim oPartOcc As ComponentOccurrence = oMainFace.ContainingOccurrence
Dim oPartCompDef As PartComponentDefinition = oPartOcc.Definition
Dim oMainSketch As PlanarSketch = Nothing
Dim oMainNativeFace As Face = oMainFace.GetSourceFace(True) 'Возвращает нативную плоскость из измененной в сборке, если это нативная плоскость, то возвращает Nothing
If IsNothing(oMainNativeFace) Then
oMainSketch = oPartCompDef.Sketches.Add(oMainFace.NativeObject, False)
Else
oMainSketch = oPartCompDef.Sketches.Add(oMainNativeFace, False)
End If