Add3dFace method example

  
Sub Add3dFaceExample()
' This example creates and adds a 3D face to the drawing.
    ' Define the four coordinates of the face
    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
    ' Add the 3DFace object
    Dim faceObj As Acad3DFace
    Set faceObj = ThisDrawing.ModelSpace.Add3DFace(Pt1, Pt2, Pt3, Pt4)
    faceObj.Update
    ThisDrawing.Application.ZoomExtents
End Sub

© Bricsys NV. All rights reserved.