How to get the relationship between a Line Style and a Line Pattern?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
One of my teammates is struggling to figure out how to find the relationship between a line style and a line pattern in the Revit project environment. He has done lots of searching, but has not found a solution. I believe he's currently working in the Revit 2014 environment, but we'd obviously want this to work in newer versions of Revit, and will take what we can get.
For example, line styles are basically a subcategory of the Line category. The general Line category can have many Line Style subcategories, and all subcategories of the Line category apparently *are* line styles.
To get to line patterns, you use a FilteredElementCollector.OfClass(LinePatternElement)
Line Patterns have a name and a list of LineSegment classes, each which has a Lengh double and an enum LineSegmentType (e.g. dash, dot or space).
Each line style can have exactly 1 line pattern or no line patterns. What we need to find out is which line pattern (if any) is related to each line style (subcategory). There does not seem to be, for example, a LinePattern property on the Category class (Category class is used for both Categories and SubCategories, so in reality a Line Style is of the Category class).
Thanks very much for any assistance you can provide.