NX⼆次开发之程序组及操作重命名Option Strict Off
有关祖国的作文
Imports System
Imports System.IO
Imports System.Windows.Forms
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.Utilities
允禧Module TestRenameCamObjects
Dim theSession As Session = Session.GetSession()
Dim theUFSession As UFSession = UFSession.GetUFSession()卤菜怎么做
Dim theUI As UI = UI.GetUI()
Dim TempPath As String = Environment.GetEnvironmentVariable("TMP")
Dim UGRelea As String = Nothing
三薪是哪几天Dim UGFullRelea As String = Nothing
Sub Main(Args As String())
theSession.LogFile.WriteLine("Executing ... " & _
System.Reflection.Asmbly.GetExecutingAsmbly().Location)
Threading.Thread.CurrentThread.CurrentCulture = New Globalization.CultureInfo("en-US")
Threading.Thread.CurrentThread.CurrentUICulture = New Globalization.CultureInfo("en-US")
UGRelea = theSession.GetEnvironmentVariableValue("UGII_VERSION")
UGFullRelea = theSession.GetEnvironmentVariableValue("UGII_FULL_VERSION")
System.Windows.Forms.Application.EnableVisualStyles()
Dim MyUndoMark As Session.UndoMarkId = _
theSession.SetUndoMark(Session.MarkVisibility.Visible, "TestRenameCamObjects")
' uncomment the following lines to check for the correct application
Dim AppID As Integer = UFConstants.UF_APP_NONE汴梁八景
theUFSession.UF.AskApplicationModule(AppID)
If AppID <> UFConstants.UF_APP_CAM Then
theUI.NXMessageBox.Show("Application missmatch", NXMessageBox.DialogType.Error, "No NX CAM ssion, Exiting!") Exit Sub
End If
For i As Integer = 0 To theUI.SelectionManager.GetNumSelectedObjects() - 1
Dim theSelectedObject As TaggedObject = theUI.SelectionManager.GetSelectedTaggedObject(i)
If theSession.Parts.Work.CAMSetup.IsGroup(theSelectedObject) Then
Dim thePartName As String = IO.Path.GetFileNameWithoutExtension(theSession.Parts.Work.FullPath)
Dim theIndex As String = NXOpenUI.NXInputBox.GetInputString("Enter Index")
Dim theGroupName As String = Left(thePartName, 12).Replace("-", "_") & "_" & theIndex & "_" & Right(thePartName, 4) Dim theNcGroup As CAM.NCGroup = CType(theSelectedObject, CAM.NCGroup)
theNcGroup.SetName(theGroupName)
Dim theCounter As Integer = 0
For Each theCAMObject As CAM.CAMObject In theNcGroup.GetMembers()
If theSession.Parts.Work.CAMSetup.IsOperation(theCAMObject) Then
theCAMObject.SetName(theCounter.ToString("00") & "_" & theCAMObject.Name)蔬菜种植
theCounter += 1
If theCounter > 99 Then Exit For
End If
Next
End If
Next
End Sub
Public Function GetUnloadOption(ByVal dummy As String) As Integer年后找工作好找吗
Return CInt(Session.LibraryUnloadOption.Immediately)似玉生香
End Function
End Module