I'm currently working on a MEP schedule (mechanical equipment schedule)[Pic 1]
in column D i have Name of mechanical equipment, in column A i have its mechanical system name
in column C i need for every system to print all of the spaces' names, where diffusers with the same system name parameter(as in A column) are placed. It's important to state, that both A, C, D parameters are located in mechanical equipment element
[PIC 1 - MEP schedule]
I've already designed Dynamo scripts for filling this column by either space name or system name, but both of these solutions are far from optimal:
1. Using space name requires too much manual labor and time for inputting each space name(or index)
2. Sometimes dynamo fails to generate space geometry, and utilizing space bounding box might end in a wrong space name used
However, in MEP system browser [Pic 2] we have some kind of conviniently placed data: system name, mechanical equipment of this system and all of the air diffusers with spaces they are located in.
The problem is I can't find a way to get this data whether it's exporting or utilizing Revit API.
[PIC 2 - MEP system browser]
Do you have any ideas how i can get hands on this data? Prolly other ways of solution, or working Python/DesignScript code to use in dynamo?
I like to keep things simple and follow the KISS principle:
https://en.wikipedia.org/wiki/KISS_principle
To simplify your query, I would like to eliminate the following aspects from it, if possible: Dynamo, System Browser, Column, etc.
As far as I can tell, the following task is the core issue and captures all you need:
Given a mechanical system, list the names of all spaces containing diffusers belonging to it.
Is that a correct reformulation of your requirement?
At least it is more succinct 🙂
@jeremytammik yes, that's correct 🙂
However, simplification of the task has not shed the light on the solution so far
Absolutely true. Now, we.can address the simplified question. Effectively.
By the way, the answer to the original question may very well be 'no'. I do not think that you can extract results from the system browser display.
However, you definitely can create a list of the names of all spaces containing diffusers belonging to specific mechanical system.
In fact, it may be doable in.a single statement with a simple filtered element collector.
Let me put on my thinking cap...
I think that maybe what you need is in my AdnRme sample application:
https://github.com/jeremytammik/AdnRme
So, I took a look at that and discovered that it was not yet migrated to Revit 2020 or 2021.
I just did so, and fixed the deprecated API usage.
Now I'll see whether it does in fact implement what you need, or anything similar...
Maybe you would like to take a look at it in any case, if you are not already aware of it...
So, I did not find what you need in AdnRme.
However, I found something pretty close in The Building Coder samples:
https://github.com/jeremytammik/the_building_coder_samples
#region Retrieve pipes belonging to specific system type
/// <summary>
/// Retrieve all pipes belonging to
/// a given pipe system type, cf.
/// https://forums.autodesk.com/t5/revit-api-forum/filteredelementcollector-by-pipe-system-types/m-p/8620113
/// </summary>
FilteredElementCollector GetPipesForSystemType(
Document doc,
string system_name )
{
FilteredElementCollector fec
= new FilteredElementCollector( doc );
// Identify the parameter to be filtered by
ParameterValueProvider pvp
= new ParameterValueProvider( new ElementId(
BuiltInParameter.RBS_PIPING_SYSTEM_TYPE_PARAM ) );
// Set string evaluator so that it equals string
FilterStringRuleEvaluator fsre = new FilterStringEquals();
//Create a filter rule where string value equals system_name
FilterRule fr = new FilterStringRule(
pvp, fsre, system_name, true );
// Create Filter
ElementParameterFilter epf
= new ElementParameterFilter( fr );
// Apply filter to filtered element collector
fec = fec.WherePasses( epf );
return fec;
}
#endregion // Retrieve pipes belonging to specific system type
It retrieves pipes, not diffusers.
It is super efficient, since it uses a parameter filter (inside Revit) instead of much slower post-processing of results in .NET (outside Revit core).
Do diffusers also have the RBS_PIPING_SYSTEM_TYPE_PARAM parameter?
Please check it out and let us know how it goes for you.
Thank you!
Cheers,
Jeremy
Can't find what you're looking for? Ask the community or share your knowledge.