Book a Demo

Author Topic: Search elements filtered on ClassifierId  (Read 3026 times)

ashwinib

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Search elements filtered on ClassifierId
« on: July 09, 2008, 09:39:18 pm »
Hi,

Is there any method with which i will get the collection of elements where classifierId is some ElementId (like ClassifierId = 62) from whole repository.

Or Is there any method available in API with which I will get list of all the elements (in Packages or sub packages...).

List<Element> having all the elements from repository.

Is any of above method available??

Thanks & Regards,
Ashwini

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Search elements filtered on ClassifierId
« Reply #1 on: July 09, 2008, 10:17:03 pm »
Hi Ashwini,

You can run a prepared search - I'll leave you to look up searches - VIA the repository.RunModelSearch method.

There is also a Repository.SQLQuery method which lets you run an SQL query directly against the model database.

You'll have to fiddle around a bit to see how the results are returned, but it does make sense. [Particularly so if you are using generics...]

David
No, you can't have it!