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

    MsgBox "First edge of the face is currently: " & GetFirstEgdeVisiblity(faceObj)

    ' Toggle the visibility of the first edge of the face

    faceObj.SetInvisibleEdge 0, Not (faceObj.GetInvisibleEdge(0))

    faceObj.Update

    MsgBox "First edge of the face is now: " & GetFirstEgdeVisiblity(faceObj)

End Sub

Private Function GetFirstEgdeVisiblity(theFaceObject As Acad3DFace) As String

    GetFirstEgdeVisiblity = IIf(theFaceObject.GetInvisibleEdge(0), "UnVisible", "Visible")

End Function

 


Bricscad™ is commercialized by Bricsys NV. Bricsys NV and Vondle NV are fully owned subsidiaries of Menhirs NV. © 2001- Menhirs NV - All rights reserved.