Retrieve category of lines

Retrieve category of lines

Anonymous
Not applicable
2,767 Views
12 Replies
Message 1 of 13

Retrieve category of lines

Anonymous
Not applicable

I spend a lot of time in revit's V/G overrides panel turning on and off categories and sub-categories in order to figure out what category a specific line as part of an element is in. With different window and door families loaded in to a project for instance, there often is a great number of sub-categories that I need to go through, before I'm able to find the specific one that I want to change to appearance of.

 

Using the Linework tool, when I hover over a line it'll tell me that the appearance of a line is set <By Category>. What would be really helpful though, was if it told me what specific category it is for the line in question.

 

So my question is, is there a tool in Revit, where I can point at a line and retrieve the category/sub-category controlling its appearance? Or possibly a plugin or dynamo script for this?

 

0 Likes
2,768 Views
12 Replies
Replies (12)
Message 2 of 13

PavelAnd
Advisor
Advisor

Hi @Anonymous ! As one of the options, in order not to look for types in V / G, you can open a family, select an element and see its style. But this is also not a quick option.

 

Снимок1.png

Best regards, Pavel Plotitsyn.

0 Likes
Message 3 of 13

Anonymous
Not applicable

Hi @PavelAnd , thank you, yes I know about that option, but to me that's equally tiresome..

 

It doesn't seem right to me, that there's no easy option or tool for this?

0 Likes
Message 4 of 13

PavelAnd
Advisor
Advisor

@Anonymous, other way is using Revit Lookup. Below are some screenshots of the solution.

 

Безымянный1.pngБезымянный2.pngБезымянный3.pngБезымянный4.pngБезымянный5.png

Best regards, Pavel Plotitsyn.

Message 5 of 13

Anonymous
Not applicable

Thank you, I will look into this add-on!

0 Likes
Message 6 of 13

martijn_pater
Advisor
Advisor

Objects have assigned subcategories, which have a line style ((sub)category)...? Edit: ah I see what you mean, yes I guess it could be usefull to see the objects/line subcategory there... You could also do some things with a view filter and/or create project parameters for objects ie. line_style_pen_x if you don't want to check subcategories...

0 Likes
Message 7 of 13

Anonymous
Not applicable

Hi there, could you possily elaborate on the project parameter thing? Not entirely sure that I catch what you mean.

0 Likes
Message 8 of 13

martijn_pater
Advisor
Advisor

This is not nescessarily a 'proper' workflow I suppose, but it is a possibility. To explain I created a project parameter called line_style_override (for all categories, you probably don't need all but that was easier). Then you can create a filter to check this parameter for elements in the view, in this example I made a filter checking if the value equals Pen_12, then setting the filter override to Pen_12 (also made it blue). I could make 11 more filters for Pen_1 to 11. Ofcourse this text parameter is sensitive to the input, you could also use yes/no ie. in a different manner. I used a project parameter to be able to set all elements in view this way.

0 Likes
Message 9 of 13

Anonymous
Not applicable

Hi Martijn, thank you for the thorough explanation. As I understand it, this does actually not accomplish what I want - this tells me if an element has a specific pen, but not what the sub-category is?

 

It's the sub-category name that's interesting here, as that is what I will be looking for in the V/G overrides afterwards to assign the graphic style I want.

0 Likes
Message 10 of 13

martijn_pater
Advisor
Advisor

Ah yes I know, it's more an answer to allow you to "control(ling its) appearance(s) [red;]"... bypassing not knowing the subcategory alltogether... No, it does not tell you what pen an element has, it allows you to override pen settings and/or visibility for all elements with a view filter.

Guess you do need to edit the family to find out what subcategory something has or use above mentioned tool (which I'm looking into because that seems useful:) ) 

0 Likes
Message 11 of 13

Anonymous
Not applicable

I am trying to see now if I can make a dynamo script that lets me pick a line and it then outputs the information I'm looking for. Will report back if it works..

0 Likes
Message 12 of 13

PavelAnd
Advisor
Advisor

Hi @Anonymous! I wrote a couple of nodes to get the solid style. You need to upload the .dll file to Dynamo, open the .dyn script, select the item (use Tab if the family is nested) and run the script.

 

Безымянный1.pngБезымянный2.png

Best regards, Pavel Plotitsyn.

0 Likes
Message 13 of 13

barthbradley
Consultant
Consultant

Sounds like you are discovering the importance of establishing naming conventions.  It also sounds like you are creating way too many Object Style Subcategories.   I mean, if you are "spending a lot of time in Revit's V/G overrides panel turning on and off categories and sub-categories in order to figure out what category a specific line as part of an element is in", as you say you are, it sounds like there must be a heck of a lot of Subcategories listed under each  Category without names that even hint at what the Subcategory is for.  

0 Likes