GetInvisibleEdge / SetInvisibleEdge example


Sub GetInvisibleEdge_Example()
' This example adds a 3D face to the drawing.
' It then uses the GetInvisibleEdge and SetInvisibleEdge methods.
' Note: both methods get/set the INvisibility of an edge. (so False=visible, True=unvisible....)
    Dim Pt1(0 To 2) As Double: Pt1(0) = 0: Pt1(1) = 0: Pt1(2) = 0
    Dim Pt2(0 To 2) As Double: Pt2(0) = 3: Pt2(1) = 0: Pt2(2) = 2
    Dim Pt3(0 To 2) As Double: Pt3(0) = 6: Pt3(1) = 5: Pt3(2) = 0
    Dim Pt4(0 To 2) As Double: Pt4(0) = 4: Pt4(1) = 4: Pt4(2) = 2
    Dim myObj As Object
    ' Add the 3DFace object
    Dim faceObj As Acad3DFace
    Set faceObj = ThisDrawing.ModelSpace.Add3DFace(Pt1, Pt2, Pt3, Pt4)
    faceObj.Update
    ThisDrawing.Application.ZoomExtents
    ThisDrawing.Application.ZoomScaled 0.5, acZoomScaledRelative
    MsgBox "First edge of the face is currently: " & GetFirstEgdeVisiblity(faceObj)
    ' Toggle the visibility of the first edge of the face (now you see me, now you don't...)
    faceObj.SetInvisibleEdge 0, Not (faceObj.GetInvisibleEdge(0))
    faceObj.Update
    MsgBox "First edge of the face is now: " & GetFirstEgdeVisiblity(faceObj)
    faceObj.SetInvisibleEdge 0, Not (faceObj.GetInvisibleEdge(0))
    faceObj.Update
    MsgBox "First edge of the face is now: " & GetFirstEgdeVisiblity(faceObj)
End Sub

© Bricsys NV. All rights reserved.