Thanks for your reply! I think its a bit less simple then that
It should look at every single sigment. Sorry if i suggested wrong. The python code might need to be adjusted
In my example X = 60 and Y = 12.
The amount of X needs to be calculated.
Output can either be:
Amount X (dimension devidable by X)
Amount X + Y (dimension -Y devidable by X)
Amount X - Y (dimension +Y devidable by X)
if not devidable by any of those:
invalid (if none of the above applies)
if its not a whole number in any of those 3 options, it should be invallid.
Its counting bricks. parts of bricks are not wanted.
So basicly X = brick, Y = seam
options are z bricks, z bricks - seam, z bricks + seam. if its none of those it should write invalid.
if the user notices the invalid, he is automaticly triggered the wall needs to change. because its actualy an invalid length.
EDIT: Maybe this could be done alot easyer, or better. If anyone knows how also let me know
Something else… after i did all this, how do i keep the link with the actual dimension, to place the calculated value where it belongs?
new.append(‘Invalid’) ? how do i addapt this python in my graph?
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
dims = UnwrapElement(IN)
A = IN
B = IN
for i in dims :
if i.Value >= 0 :
i.Below = "NEED HELP HERE"
for j in i.Segments :
j.Below = "NEED HELP HERE"
#no Output is needed
I agree with you that this is something that Python would do very efficiently, if you can run each value against if, elif, elif, else you would avoid the difficulty i’m having keeping the ‘keys’ from the initial order to the end to allow the original list order to be restored.
If I have some more time I’ll try to look at it.
Node to Code can be done like this…
Right click in the workspace when you’ve got a few nodes selected…