FindFacingDirection Function not working

Hi, I’m building a Wall Window Ratio script. I have a code block calculating the Facing Angle, Facing Direction, and Cardinal Direction. However, when I run the script, Dynamo is saying that the "Warning: Method FindFacingDirection() is not found. Any ideas on how to resolve this?

Thanks in advance,

not going in to light calculation here but if you just want the wall/window ratio wouldnt it be easier to select walls, and get host elments from selected elements, filter out windows and get the nececary parameters (rought width,roughthieght,sill hieght etc)? or am i mistaken?

if thats the case there is no need for directions unless you are doing light/energy calculations in the script aswell?

Where are you getting those methods from?

The GlassRose WWR script posted on this forum. It’s a bit older now, but I like the logic behind it. Just unsure of how to troubleshoot it

Just getting element parameters wouldn’t allow for extracting the element orientation which I do need for my Wall/Window Ratio calculations.

Otherwise, yes your method would save me a lot of trouble haha

But can you show us specifically where those methods are coming from? They are not from the core library so we can’t help you without more information.

You could also use the Revit API to get the built-in orientation properties of your elements.

You need to define the functions for FindFacingDirection() and FindFacingCardinalDirection() somewhere. Currently you’re trying to call a function that’s undefined.

image

1 Like

Thank you for the reply Hamish. I have the definitions to the top left here. But I’m unsure how of how to include them into my code block? Or if I should define them elsewhere in the script?

That’s not a definition, that’s a boolean statement that won’t really do anything because the inputs aren’t booleans.

&& is an AND operator.

e.g. if you did x&&y&&z it will output true if x and y and z are true, if one or more is false then it will output false.

There should be a thing similar to this somewhere like in my snip above:

def FunctionName(inputs)
{
things the function does
return
}
1 Like

Got it! Thanks so much Hamish!