FlipZ Example
Sub Example_FlipZ()
' This example will flip an object that uses an AecAnchorEntToCurve about the curve's Z axis. Dim obj As AcadObject Dim pnt As Variant ThisDrawing.Utility.GetEntity obj, pnt, vbCrLf & "Select a Geo anchored to a Curve" If TypeOf obj Is AecGeo Then Dim geo As AecGeo Set geo = obj Dim anchor As AecAnchor Set anchor = geo.GetAnchor If TypeOf anchor Is AecAnchorEntToCurve Then Dim curveAnchor As AecAnchorEntToCurve Set curveAnchor = anchor If curveAnchor.FlipZ Then MsgBox "FlipZ is True", vbInformation, "FlipZ Example" Else MsgBox "FlipZ is False", vbInformation, "FlipZ Example" End If ' The following line will flip the current anchor curveAnchor.FlipZ = Not curveAnchor.FlipZ Else MsgBox "Anchor not of type AecAnchorEntToCurve", vbExclamation, "FlipZ Example" End If Else MsgBox "Not an AecGeo Object", vbExclamation, "FlipZ Example" End If
End Sub