标签:
UF_DISP_display_temporary_point
使用方法:
Dim x As Double = 0, y As Double = 0, z As Double = 0
Dim theUfSession = UFSession.GetUFSession()
theUfSession.Disp.Refresh()
Dim view_tag As NXOpen.Tag = NXOpen.Tag.Null
theUfSession.View.AskWorkView(view_tag)
Dim which_views = NXOpen.UF.UFDisp.ViewType.UseWorkView
Dim layer_number As Integer = 0
theUfSession.Layer.AskWorkLayer(layer_number)
Dim color As NXOpen.UF.UFObj.DispProps
With color
.layer = layer_number
.color = 216 ‘ 114
.blank_status = UFConstants.UF_OBJ_NOT_BLANKED
.line_width = UFConstants.UF_OBJ_WIDTH_NORMAL
.highlight_status = True
End With
For Each marker_type In [Enum].GetValues(GetType(NXOpen.UF.UFDisp.PolyMarker))
Try
Dim makerpos() As Double = {x, y, z}
theUfSession.Disp.DisplayTemporaryPoint(view_tag, which_views, makerpos, color, marker_type)
Catch ex As Exception
End Try
Dim ref_point As UFDisp.TextRef = NXOpen.UF.UFDisp.TextRef.Middleleft
Dim text as String = marker_type
Dim text_coord() As Double = {x + 2, y, z}
theUfSession.Disp.DisplayTemporaryText(view_tag, which_views, text, text_coord, ref_point, color, 3, 1)
text = [Enum].GetName(marker_type.GetType, marker_type)
text_coord = {x + 5, y, z}
theUfSession.Disp.DisplayTemporaryText(view_tag, which_views, text, text_coord, ref_point, color, 3, 1)
y -= 2
Next
效果图、序号、名称如下所示:
NX Open显示符号(UF_DISP_display_temporary_point)
标签:
原文地址:http://www.cnblogs.com/bizca/p/4598094.html