Send Topic Feedback | See Object Hierarchy Chart
PC-DMIS 2023.2 Object Library
PCDLRN ActiveX DLL > PartProgram Object : CurrentArm Property
CurrentArm Property
Description
This read/write property returns or sets the active arm when using PC-DMIS in multiple arm mode.
Property type
Read-write property
Syntax
Visual Basic
Public Property CurrentArm As Long
Return Type
Read/write Long value.
Example

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

See Also