AddPolyfaceMesh method example
Sub AddPolyfaceMesh_Example()
    Dim faceObj As AcadPolyfaceMesh
    Dim vertexList(0 To 29) As Double
    vertexList(0) = 0: vertexList(1) = 0: vertexList(2) = 0     
    vertexList(3) = -2: vertexList(4) = 2: vertexList(5) = 0    
    vertexList(6) = 0: vertexList(7) = 4: vertexList(8) = 0     
    vertexList(9) = 4: vertexList(10) = 4: vertexList(11) = 0   
    vertexList(12) = 6: vertexList(13) = 2: vertexList(14) = 0  
    vertexList(15) = 0: vertexList(16) = 0: vertexList(17) = 1  
    vertexList(18) = -2: vertexList(19) = 2: vertexList(20) = 1 
    vertexList(21) = 0: vertexList(22) = 4: vertexList(23) = 1  
    vertexList(24) = 4: vertexList(25) = 4: vertexList(26) = 1  
    vertexList(27) = 6: vertexList(28) = 2: vertexList(29) = 1  
    Dim faceList(0 To 15) As Integer
    
        faceList(0) = 1
        faceList(1) = 2
        faceList(2) = 7
        faceList(3) = 6
    
        faceList(4) = 2
        faceList(5) = 3
        faceList(6) = 8
        faceList(7) = 7
    
        faceList(8) = 3
        faceList(9) = 4
        faceList(10) = 9
        faceList(11) = 8
    
        faceList(12) = 4
        faceList(13) = 5
        faceList(14) = 10
        faceList(15) = 9
    Set faceObj = ThisDrawing.ModelSpace.AddPolyfaceMesh(vertexList, faceList)
    faceObj.Update
    ThisDrawing.Application.ZoomExtents
End Sub
| ©  Bricsys NV. All rights reserved. |