How to identify polylines within polylines using AutoCAD Automation and Delphi 5?

René Guillot

Usenet Archive
Joined
Sep 11, 2003
Messages
1
Reaction score
0
Hello dear Newsgroup Readers,

Currently, I am working on a Borland Delphi 5 program that is able to retrieve information from an AutoCAD drawing and store it in a database.

More specifically: each AutoCAD-drawing (in AutoCAD 2000i/20002 format) represents a floor in a big building. Polylines are drawn on various layers and each polyline defines a room on the floor. In the database, I store information about the polyline (room), like the perimeter and area attributes. The "link" which allows the Delphi Program to "talk" to AutoCAD and send AutoCAD-commands is realised by an ActiveX Automation OLE-object.

Retrieving information like perimeter and area for a room works just fine and is not so difficult, however, now I have some nasty occurrences of polylines in the AutoCAD drawing: WITHIN the polyline, other (smaller) polylines are present. You can look at these smaller polylines as pillars or concrete columns within the room. These polylines are drawn on the same layer as the room-polyline.

Off course, these pillars have an area of their own. The area values of all the pillars-polylines in a room must be subtracted from the area of the complete room, and so calculates the "real" area of the room. There is not a ready-to-use AutoCAD-function present to accomplish this, so I must do this manually. :-(

In short, I am looking for a way to identify pillar-polylines within the room-polyline. I have to do this for every room-polyline there is in a drawing. When I can get a list somehow of all the polylines (handles) within the room-polyline, I can calculate a total amount of area which must be subtracted from the total area of the room.

Does anybody have any clue on how I could handle this problem with the use of Delphi and the AutoCAD Autmation object?

Many thanks for answers!

Rene Guillot
 

Latest threads

Back
Top