Private Sub GetInvisibleEdge_Example()
' This example adds a 3D face to the drawing.
' It then uses the GetInvisibleEdge and SetInvisibleEdge methods.
Dim faceObj As IntelliCAD.Face3D
Dim icadDoc As IntelliCAD.Document
Dim Pt1 As IntelliCAD.Point
Dim Pt2 As IntelliCAD.Point
Dim Pt3 As IntelliCAD.Point
Dim Pt4 As IntelliCAD.Point
Dim myObj As Object
Dim visStatus As Boolean
Set icadDoc = ActiveDocument
' Define the four coordinates of the face
Set Pt1 = Library.CreatePoint(0, 0, 0)
Set Pt2 = Library.CreatePoint(3, 0, 2)
Set Pt3 = Library.CreatePoint(6, 5, 0)
Set Pt4 = Library.CreatePoint(4, 4, 2)
' Add the 3DFace object
Set faceObj = icadDoc.ModelSpace.Add3DFace(Pt1, Pt2, Pt3, Pt4)
faceObj.Update
ThisDocument.ActiveViewport.ZoomExtents
visStatus = faceObj.GetInvisibleEdge(0)
MsgBox "The visibility status of the face is currently: " & visStatus
' Toggle the visibility of the first edge of the face
faceObj.SetInvisibleEdge 0, Not (visStatus)
faceObj.Update
MsgBox "The visibility status of the face is now: " & visStatus
End Sub