Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA in autocad-need to draw boundary

Status
Not open for further replies.

gsmith22

Structural
Jul 19, 2007
13
Does anyone know any VBA code for drawing a boundary in autocad? I have been unable to find any VBA commands specific to drawing a boundary other than using the command line in the following way:

ThisDrawing.SendCommand "-boundary" & vbCr

and using the start point as a point inside the area I want to draw the boundary around. Any other options or is autocad's VBA limited with respect to boundary commands?

Ultimately, I want to get the area and other geometric properties of the boundary. Does VBA have a better type of line/area object that is better suited than a boundary which would explain the limited commands? Any help would be greatly appreciated. Thanks

Greg
 
Replies continue below

Recommended for you

You should look in autocad API help.
 
This how i did it.

ThisDrawing.SendCommand "-boundary" & vbCr
ThisDrawing.SendCommand "k" & vbCr
ThisDrawing.SendCommand Pt1(0) & "," & Pt1(1) & vbCr & vbCr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor