AddSolid Example

Using Programming Languages other than VBA

Sub Example_AddSolid()
	' This example creates a solid in model space.

	Dim solidObj As AcadSolid
	Dim point1(0 To 2) As Double
	Dim point2(0 To 2) As Double
	Dim point3(0 To 2) As Double
	Dim point4(0 To 2) As Double

	' Define the solid
	point1(0) = 0#: point1(1) = 1#: point1(2) = 0#
	point2(0) = 5#: point2(1) = 1#: point2(2) = 0#
	point3(0) = 8#: point3(1) = 8#: point3(2) = 0#
	point4(0) = 4#: point4(1) = 6#: point4(2) = 0#

	' Create the solid object in model space
	Set solidObj = ThisDrawing.ModelSpace.AddSolid(point1, point2, point3, point4)
	ZoomAll

End Sub

 

   Comments?