SelectAll filter

SelectAll filter

odoshi
Collaborator Collaborator
512 Views
2 Replies
Message 1 of 3

SelectAll filter

odoshi
Collaborator
Collaborator

Hi,

 

I'm trying:

 

TypedValue[] tvBldg = {
            new TypedValue((int)DxfCode.Operator, "<AND"),
            new TypedValue((int)DxfCode.ExtendedDataRegAppName, "MYAPP"),
            new TypedValue((int)DxfCode.Start, "LWPOLYLINE"),
            new TypedValue((int)DxfCode.Operator, "AND>") };

            SelectionFilter filBldg = new SelectionFilter(tvBldg);
            PromptSelectionResult resBldg = ed.SelectAll(filBldg);

But the PromptSelectionResult is always coming up with an error status.

 

Is this not the right way? I tried it with/without the <AND AND> as well, and there is a polyline tagged with the Xdata.

 

* Registered Application Name: MYAPP
* Code 1000, ASCII string: BLDG

 

Thanks!

Mike Caruso
Autodesk Certified Instructor 2014
AutoCAD/Civil 3D Autodesk Certified Professional 2014, 2015, 2018
www.whitemountaincad.com
0 Likes
513 Views
2 Replies
Replies (2)
Message 2 of 3

_gile
Consultant
Consultant

Hi,

 

I do not see anything wrong with the code you posted  (the "<AND" / "AND>" is not mandatory because it's the implicit behavior, but should work too).

Perhaps attach some drawing sample so that other can test.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 3 of 3

odoshi
Collaborator
Collaborator

Thanks Gilles,

 

I'll go back and doublecheck the drawing. I just wanted to see if there were any known issues with SelectAll vs. the user interactive selection methods when it comes to xdata filters.

 

Regards,

 

Mike Caruso
Autodesk Certified Instructor 2014
AutoCAD/Civil 3D Autodesk Certified Professional 2014, 2015, 2018
www.whitemountaincad.com
0 Likes