.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Filter like AutoCAD's

5 REPLIES 5
Reply
Message 1 of 6
wesbird
425 Views, 5 Replies

Filter like AutoCAD's

Hi, 

  I'm thinking to work a filter machinum like AutoCAD's.

  I have a system to link a lot data to a AutoCAD graphic object (LINE, ARC, PLINE).  is it possible to create filter system e.g. 

 

  (-4 . "<OR")

  (-4 . "<AND")("Dept" . "HR")("Salary" ">8000")(-4 . "AND>")

  (-4 . "<AND")("Dept" . "IT")("Salary" ">12000")(-4 . "AND>")

  ...

  (-4 . "OR>")

 

  how to design the syntax and implement the engine? 

 

  If you can point me the right direction, I appreciate your time

 

 

Wes

Windows 10 64 bit, AutoCAD (ACA, Map) 2023
5 REPLIES 5
Message 2 of 6
quigs
in reply to: wesbird

Something like this?

 

    ' Select
    Dim Sel As New PromptEntityOptions("Select:")
    Sel.SetRejectMessage("You must select an arc or circle object." & vbCrLf)
    Sel.AddAllowedClass(GetType(Arc), False)
    Sel.AddAllowedClass(GetType(Circle), False)

    Sel.AddAllowedClass(GetType(Polyline), False)

    Dim myPER As PromptEntityResult = myEd.GetEntity(Sel)

 

Cheers,

 

Martin

My name is Martin.. 😄
Message 3 of 6
Alfred.NESWADBA
in reply to: wesbird

Hi,

 

>> ("Dept" . "HR")("Salary" ">8000")

As there is no standard for saving "Dept" or "Salary" it would be great to know where you did store this values. There are so much options like EED's, XRecords, AttributeReferences, ObjectData (for Map3D) ... also part of layernames ....

 

Then we have a chance to give you input how you can filter to objects that matches these values.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 4 of 6
quigs
in reply to: wesbird

Oh yeah I see, sorry, I thought you were just trying to select geometry. I should have read OP properly.

My name is Martin.. 😄
Message 5 of 6
michael.robertson
in reply to: wesbird

Not sure exactly what you are wanting to do.

Are you wanting to implement your own Filter mechinism inside AutoCAD or use AutoCADs filter mechinism to pullout information?

 

If you are trying to create your own and using a .NET language have you thought about using Linq instead?

http://drive-cad-with-code.blogspot.com/2011/04/tips-of-using-linq-in-autocad-net.html

Mike Robertson
FL. Dept. of Transportation
CADD Applications Developer
Message 6 of 6
wesbird
in reply to: michael.robertson

Thank you, Mike. 

 

I like to create my own filter, filte my own data. It could be store anywhere, external database, xdata and dictionary. 

It work similiar to AutoCAD's, or like database

 

SELECT 

FROM 

WHERE (Dept = "HR" AND Salary>8000)

OR

(Dept = "IT" AND Salary>12000)

  ...

 

I need define a syntax and implement a engine to with it. I have no idea where to start. 

 

 

Thank you again for your time. 

Wes

Windows 10 64 bit, AutoCAD (ACA, Map) 2023

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost