Sub Ch8_Create3DMesh() Dim meshObj As AcadPolygonMesh Dim mSize, nSize, Count As Integer Dim points(0 To 500) As Double Dim m As Long Dim n As Long Dim a As Long With ThisDrawing.Utility m = 5 n = 1 a = 0 End With ' tao mang chia cac diem While n < m points(12 * a) = 0: points(12 * a + 1) = 0: points(12 * a + 2) = 0 points(12 * a + 3) = n: points(12 * a + 4) = 0: points(12 * a + 5) = 0 points(12 * a + 6) = n: points(12 * a + 7) = n: points(8) = 0 points(12 * a + 9) = 0: points(12 * a + 10) = n: points(12 * a + 11) = 0 n = n + 1 a = a + 1 Wend mSize = 4: nSize = 4 'tao luoi khong giang mo hinh Set meshObj = ThisDrawing.ModelSpace.Add3DMesh(mSize, nSize, points) ' thay doi huong nhin Dim NewDirection(0 To 2) As Double NewDirection(0) = 0 NewDirection(1) = 0 NewDirection(2) = 0 ThisDrawing.ActiveViewport.Direction = NewDirection ThisDrawing.ActiveViewport = ThisDrawing.ActiveViewport ZoomAll End Sub