- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a tool that assigns custom XDATA to entities. I am attempting to fetch some of the entities using a selection filter based on "ExtendedDataAsciiString" (code 1000) and a value.
For the same XDATA values assigned to two entities, it will work for anything that is not a block but for a block the selection filter will not work (tested it using AutoCAD 2012 and 2013).
To test it out create a block and a line in a drawing. Using the XDATA command add a string (Str) with the value "1234" to each entity.
Then with objectARX attempt to select the entities using a SelectionFilter based on that string.
Ex:
TypedValue[] tvs = new TypedValue[1];
tvs[0] = new TypedValue((int)DxfCode.ExtendedDataAsciiString, "1234");
SelectionFilter sf = new SelectionFilter(tvs);
PromptSelectionResult result = AcadTools.Editor.SelectAll(sf);
This will never retreive the block reference but works with other type of entities.
I found a thread about this but it dates back to 2007... I am wondering why this does not work specifically for blocks?
Thanks
Marc
Solved! Go to Solution.