Message 1 of 2
Not applicable
01-15-2013
01:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
ObjectARX 2007
Is it possible to select entities of multiple layers?
I've looked at...
http://through-the-interface.typepad.com/through_the_interface/2008/07/conditional-sel.html
...and tried the following code.
string[] layerNames = {"1", "2", "3"};
TypedValue[] tdv = new TypedValue[(layerNames.Length * 3) + 2];
int i = 0;
tdv[i++] = new TypedValue((int)DxfCode.Operator, "<or");
foreach (string ln in layerNames)
{
tdv[i] = new TypedValue((int)DxfCode.Operator, "<and");
tdv[i + 1] = new TypedValue((int)DxfCode.LayerName, ln);
tdv[i + 2] = new TypedValue((int)DxfCode.Operator, "and>");
i += 3;
}
tdv[i - 2] = new TypedValue((int)DxfCode.Operator, "or>");
SelectionFilter sf = new SelectionFilter(tdv);
PromptSelectionResult psr = ed.SelectAll(sf);This code gives me an error in the PromptSelectionResult.
What would cause the erro?
Or would there be a better way?
Solved! Go to Solution.

