- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Below is a snippet from my code trying to just get the SystemType from a MEPSystem...
I took some code from Jeremy's post on Traversing the MEPSystems, but for the life of me cannot figure out how to return the SystemType of the system I am looping through. I can print the name, but I specifically need the SystemType. I want to see HydronicSupply or HydronicReturn or SupplyAir...etc.
Will someone please educate me on how to get this? if I have my elementfilter for MEPsystems, why can I not just loop through and say system.type.toString(); or something like this?
FilteredElementCollector systemCollector = new FilteredElementCollector(doc).OfClass(typeof(MEPSystem));
IEnumerable<MEPSystem> desirableSystems
= systemCollector.Cast<MEPSystem>().Where<MEPSystem>
(s => IsDesirableSystemPredicate(s));
foreach (MEPSystem system in desirableSystems) {
string cntdSys = system.*** WHAT DO I DO HERE? ***
sb.Append("System Type: " + cntdSys + "\n");
Solved! Go to Solution.