XVector and YVector property example
Sub X_Vector_Example()
Dim origin(0 To 2) As Double: origin(0) = 0: origin(1) = 0: origin(2) = 0
Dim xAxisPoint(0 To 2) As Double: xAxisPoint(0) = 4: xAxisPoint(1) = 3: xAxisPoint(2) = 0
Dim yAxisPoint(0 To 2) As Double: yAxisPoint(0) = -3: yAxisPoint(1) = 4: yAxisPoint(2) = 5
Dim ucsObj As AcadUCS
Dim UCSName As String
UCSName = InputBox("Type a name for the user coordinate system:")
Set ucsObj = ThisDrawing.UserCoordinateSystems.Add(origin, xAxisPoint, yAxisPoint, UCSName)
ThisDrawing.ActiveUCS = ucsObj
MsgBox "XVector(0) = " & ucsObj.XVector(0) & Chr(13) & "XVector(1) = " & ucsObj.XVector(1) & Chr(13) & "XVector(2) = " & ucsObj.XVector(2)
MsgBox "YVector(0) = " & ucsObj.YVector(0) & Chr(13) & "YVector(1) = " & ucsObj.YVector(1) & Chr(13) & "XVector(2) = " & ucsObj.YVector(2)
End Sub
© Bricsys NV. All rights reserved. |