马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
高手们帮我看看下面红色标记的两条语句是做什么用的。??
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.UI
Imports NXOpen.Utilities
Module create_a_cylinder_and_set_color
Sub Main()
Dim s As Session = Session.GetSession()
Dim ufs As UFSession = UFSession.GetUFSession()
Dim wp As Part = s.Parts.Work()
Dim cyl_feat_tag As NXOpen.Tag
Dim orig() As Double = {1, 1, 0}
Dim dir() As Double = {1, 1, 1}
ufs.Modl.CreateCylinder(FeatureSigns.Nullsign, Nothing, orig, "50", _
"25", dir, cyl_feat_tag)
Dim cyl_body_tag As NXOpen.Tag
ufs.Modl.AskFeatBody(cyl_feat_tag, cyl_body_tag)
Dim cyl_body As Body = CType(NXObjectManager.Get(cyl_body_tag), Body)
MsgBox("Color change", MsgBoxStyle.Information, "Current Operation:")
cyl_body.Color = 3
cyl_body.RedisplayObject()
s.Preferences.ScreenVisualization.FitPercentage = 95
wp.Views.WorkView.Fit()
Public Function GetUnloadOption(ByVal dummy As String) As Integer
GetUnloadOption = UFConstants.UF_UNLOAD_IMMEDIATELY
End Function
End Module |