If the rectangle exists, and you want to draw the Polygon inside it [which your use of "inscribe" and "put a Polygon inside" suggest], you would need to provide more information about how the corners locations of the polygon are to be determined. If it is entirely up to the User and you just want to ensure that it meets the rectangle edges exactly, just turn on Nearest object snap mode.
If the polygon exists, and is a single object [mostly likely a Polyline, but could be a Block or Polyface or Region or 3DFace or Solid (2D or 3D) or maybe some other things], and you want to draw a rectangle around its extents, in simplest terms you can do this:
(vl-load-com)
(defun C:DBB (/ minpt maxpt); Draw Bounding Box of selected object
(vla-getboundingbox (vlax-ename->vla-object (car (entsel "\nSelect object: "))) 'minpt 'maxpt)
(command "_.rectang" "_none" (vlax-safearray->list minpt) "_none" (vlax-safearray->list maxpt))
)
That would draw it on the current Layer. It could be made more sophisticated, to draw it on a specified Layer, or the Layer of the selected object, and/or use options within the RECTANG command, etc.
Just for your info agent47x
http://dictionary.reference.com/browse/Inscribe
>>> inscribe
Geometry. to draw or delineate (one figure) within another figure sothat the inner lies entirely within the boundary of the outer, touching itat as many points as possible:
// Called Kerry in my other life.
Everything will work just as you expect it to, unless your expectations are incorrect.
class keyThumper<T> : Lazy<T>; another Swamper