LocalDef Function
Returns local definition status.
Syntax
LocalDef (localCoordinateNumber)
Parameters
- localCoordinateNumber
- Specify the local coordinate system number (an integer from 1 to 15) for which the status is to be returned.
Return Values
True if the specified local has been defined, otherwise False.
See Also
Arm Statement, ArmClr Statement, ArmSet Statement, ECPSet Statement, Local Statement, LocalClr Statement, Tool Statement, TLClr Statement, TLSet Statement
LocalDef Function Example
- Code
Function DisplayLocalDef(localNum As Integer)
' Function to display the definition status and values of a local coordinate system
' Parameter: localNum - Local coordinate system number (1-15)
' If the local coordinate system is defined, displays its values
' If not defined, displays a message indicating it is not defined
' If the input number is outside the valid range, displays an error message
' Validate input range (1-15)
If localNum < 1 Or localNum > 15 Then
' Display error message for invalid range
Print "Please enter a value for defined Local coordinate system from 1 to 15"
Exit Function
EndIf
' Check if the local coordinate system is defined and display appropriate message
If LocalDef(localNum) = False Then
' Display message when not defined
Print "Local " + Str$(localNum) + " is not defined"
Else
' Display local coordinate system number and values when defined
Print "Local " + Str$(localNum) + ":"
Print Local(localNum)
EndIf
Fend
- Prerequisite: Local settings
- Local 1: X: -300.000 Y: 250.000 Z: -100.000 U: 45.000 V: 0.000 W: 0.000 /R /0
- Local 2: Undefined
- I/O
- X: -300.000 Y: 250.000 Z: -100.000 U: 45.000 V: 0.000 W: 0.000 /R /0
- Local 2 is not defined
- Please enter a value for defined Local coordinate system from 1 to 15
1 >
Local 1:
2 >
16 (out of range) >