Hi guys, i got stuck solving following problem. Want I want from script is to take all rooms, then all walls from specific room and sort them to left, right, top and bottom. I’ve used Wall.Orientation from Clockwork and NorthSouth… node from Rhythm, but it does not work properly. Wall.orientation node is giving incorrect values.
I am pretty rookie in Dynamo, big thanks for any help in advance.
I have a similar problem here from long back…!
I tried to create a script for it but dint work well with non rectangular room…!
Hi, thanks for response. I also tried curve.normalAtparameter to get normals but it works as screen below. The orientation node repects project north…?hmm, It gives you only north vector, what about S,E,W?
Yeah, you are using the node right (Rhythm), but I believe that is due for an update. Let me check it out.
You might also want to peak at the logic in the old case apps.
-John
Guys, thanks for advice, but l realized that “Wall orientation scripts” depends on vector’s sense. So the scripts may run only if all walls will be drawn same way
This is a known issue in clockwork. If the shape handle is flipped, the normal direction does not update. It is being tracked HERE. You can fix this by accessing the Flipped Property of the wall and reversing the normal vector if it is true.
In regards to the flipped property, I used the following in a python node, inside a custom node. Please note that this is messy python, i’m quite new there myself but it should get you going until clockwork gets updated.
import clr
import sys
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitAPIUI')
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
doc = DocumentManager.Instance.CurrentDBDocument
app = DocumentManager.Instance.CurrentUIApplication.Application
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
walls = IN[0]
flip_walls = []
for i in UnwrapElement(walls):
if i.Flipped:
value = True
else:
value = False
flip_walls.append(value)
OUT = flip_walls
FYI: This is fixed in the current Clockwork release.