Function GetGemoGroup_Name(ByVal camObjectTag As NXOpen.Tag) As Stringui
Dim theGemoGroupTag As NXOpen.Tagspa
Dim gemoGroupName As String = ""it
theUfSession.Oper.AskGeomGroup(camObjectTag, theGemoGroupTag) io
theUfSession.Obj.AskName(theGemoGroupTag, gemoGroupName) 程序
Return gemoGroupName im
End Functiondi
Function GetToolPathName(ByVal camObjectTag As NXOpen.Tag) As String時間
Dim toolPathName As String = ""ant
theUfSession.Oper.AskNameFromTag(camObjectTag, toolPathName) co
Return toolPathName
End Function
Function GetToolName(ByVal camObjectTag As NXOpen.Tag) As String
Dim toolName As String = ""
Dim toolTag As NXOpen.Tag
theUfSession.Oper.AskCutterGroup(camObjectTag, toolTag)
theUfSession.Obj.AskName(toolTag, toolName)
Return toolName
End Function
Function GetToolNumber(ByVal camObjectTag As NXOpen.Tag) As Integer
Dim toolTag As NXOpen.Tag
Dim toolNumber As Integer
theUfSession.Oper.AskCutterGroup(camObjectTag, toolTag)
theUfSession.Param.AskIntValue(toolTag, NXOpen.UF.UFConstants.UF_PARAM_TL_NUMBER, toolNumber)
Return toolNumber
End Function
Function GetToolHeight(ByVal camObjectTag As NXOpen.Tag) As Double
Dim toolTag As NXOpen.Tag
Dim toolHeight As Double
theUfSession.Oper.AskCutterGroup(camObjectTag, toolTag)
theUfSession.Param.AskDoubleValue(toolTag, NXOpen.UF.UFConstants.UF_PARAM_TL_HEIGHT, toolHeight)
Return toolHeight
End Function
Function GetToolDiameter(ByVal camObjectTag As NXOpen.Tag) As Double
Dim toolTag As NXOpen.Tag
Dim toolDiameter As Double
theUfSession.Oper.AskCutterGroup(camObjectTag, toolTag)
theUfSession.Param.AskDoubleValue(toolTag, NXOpen.UF.UFConstants.UF_PARAM_TL_DIAMETER, toolDiameter)
Return toolDiameter
End Function
Function GetToolFluteLength(ByVal camObjectTag As NXOpen.Tag) As Double
Dim toolTag As NXOpen.Tag
Dim toolFluteLength As Double
theUfSession.Oper.AskCutterGroup(camObjectTag, toolTag)
theUfSession.Param.AskDoubleValue(toolTag, NXOpen.UF.UFConstants.UF_PARAM_TL_FLUTE_LN, toolFluteLength)
Return toolFluteLength
End Function
Function GetToolCornerRadius(ByVal camObjectTag As NXOpen.Tag) As Double
Dim toolTag As NXOpen.Tag
Dim toolCornerRadius As Double
theUfSession.Oper.AskCutterGroup(camObjectTag, toolTag)
theUfSession.Param.AskDoubleValue(toolTag, NXOpen.UF.UFConstants.UF_PARAM_TL_COR1_RAD, toolCornerRadius)
Return toolCornerRadius
End Function
Function GetStockPart(ByVal camObjectTag As NXOpen.Tag) As Double
Dim stockPart As Double
theUfSession.Param.AskDoubleValue(camObjectTag, NXOpen.UF.UFConstants.UF_PARAM_STOCK_PART, stockPart)
Return stockPart
End Function
Function GetStockFloor(ByVal camObjectTag As NXOpen.Tag) As Double
Dim stockfloor As Double
theUfSession.Param.AskDoubleValue(camObjectTag, NXOpen.UF.UFConstants.UF_PARAM_STOCK_FLOOR, stockfloor)
Return stockfloor
End Function
Function GetSpeedValue(ByVal camObjectTag As NXOpen.Tag) As Double
Dim speedVale As Double
theUfSession.Param.AskDoubleValue(camObjectTag, NXOpen.UF.UFConstants.UF_PARAM_SPINDLE_RPM, speedVale)
Return speedVale
End Function
Function GetFeedValue(ByVal camObjectTag As NXOpen.Tag) As Double
Dim feedValue As Double
Dim camObject As NXOpen.TaggedObject = NXOpen.Utilities.NXObjectManager.Get(camObjectTag)
Dim params(0) As NXOpen.CAM.Operation
params(0) = CType(camObject, NXOpen.CAM.Operation)
Dim feedsBuilder1 As NXOpen.CAM.ObjectsFeedsBuilder = theSession.Parts.Work.CAMSetup.CreateFeedsBuilder(params)
feedValue = feedsBuilder1.FeedsBuilder.FeedCutBuilder.Value
feedsBuilder1.Destroy()
Return feedValue
End Function
Function GetCutTime(ByVal camObjectTag As NXOpen.Tag) As Double
Dim cutTime As Double
theUfSession.Param.AskDoubleValue(camObjectTag, 142, cutTime)
Return cutTime
End Function