Private Sub Add3dFaceExample()
' This example creates and adds a 3D face to the drawing.
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
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
End Sub