You can create polylines directly, without having to use the command line interface, but of course, that's a bit more involved than the 'easy' way (e.g., using the command line).
You use the Polyline class (call the constructor), and then set the properties to what you want and add the vertices, then add it to the database and to the block table record for the space you're drawing in.
Doing it that way does require some experience with the API, so if you are writing a real application that needs to draw rectangles, you can use the command line (or the ActiveX API) until you are able to use the more direct method.
Look at the code posted here and at the links posted here, for useful examples of using the API directly to create and work with AutoCAD objects.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com
wrote in message news:5790800@discussion.autodesk.com...
Well, I am extremely new to AutoCAD (let alone autocad development). Anyways, I have managed to create a rectangle through polylines. If for my knowledge purpose, you can answer what I asked earlier, it would be great. Next time onwards, I would specify what is required to mention in the email.