Visual Basic |
---|
Public Property CurrentArm As Long |
Sub Main
' This script queries the system for the
' active arm number, displays the active arm,
' and asks you if it should be changed.
' If you click Yes, then an input box
' appears allowing you to type the
' new active arm number. The script then
' updates the software to use the newly
' specified arm.
Dim App As Object
Set App = CreateObject ("PCDLRN.Application")
Dim Part As Object
Set Part = App.ActivePartProgram
Dim intNumArm As Integer
Dim intResponse As Integer
intNumArm = Part.CurrentArm
intResponse = MsgBox("The current active arm is " & intNumArm & ". Do you want to change the active arm?",4+32+0,"Change Active Arm?")
If intResponse = "6" Then
intNumArm = InputBox("Type the new active arm number (1 or 2): ")
Part.CurrentArm = intNumArm
MsgBox "Your active arm has been changed to " & intNumArm
Else
MsgBox "Nothing has changed. Closing script."
End If
End Sub