Creates a 3D solid box with edges
parallel to the axes of the WCS.
Signature
VBA : RetVal = object.AddBox(Origin, Length, Width, Height)
VL : RetVal = (vla-AddBox object
Origin Length Width Height)
(vla-addbox mspace
pt1 len wid hgt)
- Object : ModelSpace Collection,
PaperSpace Collection, Block
The object or objects this method applies to.
- Origin : Variant (three-element
array of doubles); input-only
The 3D WCS coordinates specifying the origin of the box. This
coordinate represents the center of the bounding box for the object,
not a corner.
- Length Double : input-only
The length of the box. Must be a positive number.
- Width Double : input-only
The width of the box. Must be a positive number.
- Height Double : input-only
The height of the box. Must be a positive number.
- RetVal : 3DSolid object
A 3DSolid object as the newly created box.
Example :
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq mspace (vla-get-modelspace doc))
(setq pt1 (vlax-3d-point (setq pt (getpoint "\nOrigin: "))))
(setq len (getdist "\nLength: " pt)
wid (getdist "\nWidth: " pt)
hgt (getdist "\nHeight: " pt)
)
(vla-addbox mspace pt1 len wid hgt)
|
|