Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Guys!
I'm tryiing to do a little application and for that I would like to make a normal window selection (the green/blue type) and get different object types from this selection.
So windowing on lot of objects and get only blocks or lines (for example lines, 2dpolys and 3d polys together) and etc. This is what a want.
I'm not an expert, I found a dxf code way, here it is, This is working, but I would have a more elegant way.
public static ObjectIdCollection promptForPointsByWindow() { //actual ACAD doc and editor Document acDoc = Application.DocumentManager.MdiActiveDocument; //Az Editor beállítása Editor acEd = acDoc.Editor; //defining the object filter TypedValue[] TypVal = new TypedValue[1]; TypVal.SetValue(new TypedValue((int)DxfCode.Start, "POINT"), 0); // filter to the selset SelectionFilter SelFilt = new SelectionFilter(TypVal); //user input get selection PromptSelectionResult pSelRes = acEd.GetSelection(SelFilt); SelectionSet selSet = pSelRes.Value; ObjectIdCollection points = new ObjectIdCollection(selSet.GetObjectIds()); //write out count() Application.ShowAlertDialog("A kiválasztott pontok száma: " + selSet.Count.ToString()); return points; }
Do you have a normal easy way to do it? Like AllowedTypes = .....
THX
Solved! Go to Solution.