I am using Autocad 2012 with the API provided. I am developing in c#.
What I am trying to do is select a certain layer, and "detect" all rectangles / squares in that layer. Ultimateley, I would like to be able to draw inside of all of those rectangles that I have "detected" (using their coordinates).
So far, I am using the LayerTable class along with GetObjects to associate layers with objects, like so:
String layerNames = ""; foreach (ObjectId layer in layers) { LayerTableRecord layerTableRec; layerTableRec = acTrans.GetObject(layer, OpenMode.ForRead) as LayerTableRecord; layerNames += layerTableRec.Name+"\n"; }
LayerTable layers; layers = acTrans.GetObject(acCurDb.LayerTableId, OpenMode.ForRead) as LayerTable;I can't seem to figure out where to go from here though. How to select just one layer, and then detect shapes inside of it. Can someone point me in the correct direction, in terms of what classes / methods to look into?
Thanks!