Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am trying to find all the line pattern that have/start with "IMPORT" in their name. If the Name is "IMPORT-XXXXXXX", the following code capture's it, but if the Name is "IMPORT:XXXXXXX"- it does not.
Its like ignoring anything before the semicolon and consider the line pattern name the rest of the string after the semicolon.
UIDocument uidoc = this.ActiveUIDocument;
Document doc = uidoc.Document;
FilteredElementCollector collector = new FilteredElementCollector(doc);
ICollection<Element> collection = collector.OfClass(typeof(LinePatternElement)).ToElements();
if (e.Name.Contains("IMPORT"))
{...}
Thank you.
Solved! Go to Solution.