Is there a connection API window and wall?


#1

How to get parameter indicating that the wall has a window?
The first thing that comes to mind - it’s x and y coordinates (comparing them)

What is it for?
I do Thermal calculation indoors.
using GetСompoundStruсture I know which walls surrounds the room.
I do not know how to determine whether there is a window in the room)))

What are your thoughts?


#2

Hi, in the Wall class there is a method called FindInserts()

 

from the Revit SDK: "Gets the ids of the instances inserted into this host object. "

reutrns a List of ElementIds and the arguments are 4 booleans:

addRectOpenings: True if rectangular openings should be included in the return. </span>

includeShadows: True if shadows should be included in the return. </span>

includeEmbeddedWalls: True if embedded walls should be included in the return. </span>

includeSharedEmbeddedInserts: True if shared embedded inserts should be included in the return. </span>

 

Or you can alternatively check the Id of the wall against the value in FamilyInstance.Host.Id where the family instance is a door/window.

 


#3

Paolo, thank you, but I don’t know how I can write it on the Python script

How I can get parameter: “from room” https://yadi.sk/i/5V1h9Y_MinJDz ? (screen from revit lookup)


#4

Python shouldn’t have a different way to deal with parameters from C# but in this case it does: something like door.get_FromRoom(phase) should do the trick.

Since rooms are phase dependent you need to specify in the argument which phase are you looking at.


#5

 

 

This should clarify.

FromRoomParameter


#6

Good day,

This functionality has already been available for some time in the Clockwork package. The two nodes in question are “Element.Inserts” and “Element.Host”

2015-09-01_10-00-04


#7

Paolo, Dimitar thank you!

Paolo please give the text of the script
I try to understand


#8

Paolo your script work only with doors, but not working with windows. I not understand.

123


#9

I admit it isn’t very robust :slight_smile: now should be better

FromRoomParameter


#10

Paolo, I would like a script file .dyn and file .rvt, please


#11

The RVT file is the one you find in the Revit samples, the Dynamo file is nothing much more than the Python script I’ve attached, I just added a try/except block and an if/else block to the version you already managed to write, look closely.

FromRoomParameter


#12

Paolo, thank you

what could be the problem?

I apologize for persistence

why2


#13

Try to flip the windows on the right and on the bottom side of the room and run again…