Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66763

Re: Retrieving useable line style

$
0
0

Hi,

 

After playing a bit with RevitLookup, I've found that you need to check the ParentCategory of the GraphicStyle. In you case it should be Lines.

2016-07-28_1858.png

 

Try the following code. I didn't check it myself, but should work:

            var styles = 
                new FilteredElementCollector(doc)
                .OfClass(typeof(GraphicsStyle))
                .WhereElementIsNotElementType()
                .ToElements()
                .Where(e=>e.Category!=null && e.Category.Parent!=null && e.Category.Parent.Id == new ElementId(BuiltInCategory.OST_Lines));

Thanks,

Victor.


Viewing all articles
Browse latest Browse all 66763

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>