Collecting a list of categories (Model and Annotation categories)

Collecting a list of categories (Model and Annotation categories)

Anonymous
Not applicable
5,935 Views
6 Replies
Message 1 of 7

Collecting a list of categories (Model and Annotation categories)

Anonymous
Not applicable

Hi I have created a collection of types but I wish to filter out a large portion of them by category, specifically all the categories in the highlighted sections bellow "Model Categories" and "Annotation categories".

Unfortunately this is an extremely labor intensive job if I end up using .OfCategory(BuiltInCategory. .......) so i want to know is there any feasible way of collecting the list of categories in the highlighted sections?

 

Thank you in advance, Jack

categories.PNG

0 Likes
Accepted solutions (1)
5,936 Views
6 Replies
Replies (6)
Message 2 of 7

Revitalizer
Advisor
Advisor
Accepted solution

Category.CategoryType




Rudolf Honke
Software Developer
Mensch und Maschine





Message 3 of 7

Anonymous
Not applicable

Thanks a million 🙂 great help 😄

0 Likes
Message 4 of 7

Anonymous
Not applicable

Apologies but is there a way I could apply that to a filtered element collecter or a set? I am still a student programmer and i havent used enumerations apart from on one occasion.

I just need a sample to get an idea of the syntax

0 Likes
Message 5 of 7

Anonymous
Not applicable

Sorry again, This is not the solution, I wish to return something that I quantify so that i can use in filtering elements out, I do not think that will do the job.

0 Likes
Message 6 of 7

Revitalizer
Advisor
Advisor

Dear JackTilley,

 

of course that is the solution.

It is the missing hint to enable you to sort your categories as desired.

 

Don't expect others to do your homework, you will find enough examples for filtering Elements by their properties.

E.g. here:

http://thebuildingcoder.typepad.com/blog/2010/04/anonymous-methods-in-vb.html

 

 

 

Best regards,

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 7 of 7

Anonymous
Not applicable

Sorry, yes it got it working, can't seem to delete posts on this forum :S

Thanks a million

0 Likes