- Option Explicit
- Public Sub Myl()
- Dim MyLineObject(0) As AcadEntity
- Dim firstsolid As Acad3DSolid
- Dim myarea As Variant
- Dim BasePoints(11) As Double
- BasePoints(0) = 0#
- BasePoints(1) = 0#
- BasePoints(2) = 55#
- BasePoints(3) = -25#
- BasePoints(4) = 145#
- BasePoints(5) = -25#
- BasePoints(6) = 200#
- BasePoints(7) = 0#
- BasePoints(8) = 145#
- BasePoints(9) = 25#
- BasePoints(10) = 55#
- BasePoints(11) = 25#
- Set MyLineObject(0) = ThisDrawing.ModelSpace.AddLightWeightPolyline(BasePoints)
- MyLineObject(0).Closed = True
- Dim H As Double
- Dim t As Double
- H = 30
- t = 0
- myarea = ThisDrawing.ModelSpace.AddRegion(MyLineObject)
- Set firstsolid = ThisDrawing.ModelSpace.AddExtrudedSolid(myarea(0), H, t)
- End Sub
|