Organizing multiple closed polyline(s) information into lists
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to extract as much information about a (user prompted) selected set of closed polylines into lists so that I would have a matching set of lists corresponding respectively. In Example, pLset would hold the set of polylines, ptset would hold the respective points of the polylines, objset would hold the objects inside the respective polylines, etc...
In the code below, it prompts the user to select closed polylines which get put into pLset. It goes on to collect the Area and Object ID with a running counter i. From there I would like to create a matching set that would as mentioned earlier hold the respective points to be then used to filter a WP ssget selection to get the objects inside each respective polyline in the pLset, ultimately leaving me with a set for the polyline, its points, and its containing objects. So if I wanted in the end I could print or extract all or a specific polyline and its information. Hopefully this makes sense. I would greatly appreciate any direction. Thank you!
(princ "\n Select Polyline Boundary ")
(if (setq pLset (ssget '((0 . "LWPOLYLINE")(-4 . "&")(70 . 1))))
(progn
(repeat
(setq cnt (sslength pLset))
(setq a (vlax-ename->vla-object (ssname pLset i)))
(setq tlst (list (vla-get-Area a) (vla-get-ObjectID a)))
(setq lst (cons tlst lst))
(setq i (1+ i))