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

Discussion in 'AutoCAD' started by René Guillot, Sep 11, 2003.

  1. 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
     
    René Guillot, Sep 11, 2003
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.