Get linked doors and set dimensions.belowText,how?

Hello Dynos,

I repost here the topic:

So the aim of game is: we have Layout-file where we put dimensions. So i want to set doorheight to the dimensions. My first script here is little bit infantil, but it is a first step, look at the behavour:


How can i set the correct dimension, which is hosted to the door opening?
At the moment i have a single dimension, but i would like to have multidimensions…

Can i catch the correct dimension via bounding box? or a loctionpoint? Or can i trigger a vector on it?
What are my possibilities? so that my door is able to catch the correct dimension…

KR

Andreas

setTextDimension.dyn (31.4 KB)

Try to get boundrybox of doors and then use Geometry Intersect node to match points of dimensions to the texts. Then you have 2 choices:
1-Create a custom node and then connect dimensions and text
2-Edit your code with:

for text, dimensions in zip(texts, dimensions)

how can i convert elements to geometry ?

Geometry box is not working

i can make solids

hmmm…

Where i place this node or create i a new python node with a for loop?

              for text, dimensions in zip(texts, dimensions)

Use BiMorphNodes package to get linked elements. There you can transform LinkedElement to Element.

import clr
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

dimensions = UnwrapElement(IN[0])
texts = IN[1]

if not hasattr(dimensions,"__iter__"):
	dimensions =[dimensions]
else:
	dimensions = dimensions

TransactionManager.Instance.EnsureInTransaction(doc)

results = []

for text, dim in zip(texts,dimensions):
	dim.Below = str(text)
	results.append(dim)

TransactionManager.Instance.TransactionTaskDone()

OUT = results
1 Like



actully just boundingBox works, but not the other node
script works
but im a not sure about if it is correct mapped

  • doorheigt, doordimension -

You are connecting false element type. Try to get linked doors with BiMorphnodes. LinkedElement by Category. You will be able to transform them.
Do you want to place “Rohrbauhöhe” or “Lichthöhe” of doors?

place Rohbauhöhe i got values very well and bring it to strings!
This Geometry intersect does not work…
Can i even intersect geometry with 2D stuff?

LinkedElement.Element and then Geometry
Use Dimension.Midpoint from Rhytm Package. Try to move dimensions next to door so you can check intersection with boundingbox.
Or you can get location of doors and use Geometry.Closest to node from Clockwork.


setTextDimension.dyn (29.3 KB)
2020-07-30_15h07_23
KOM-Demo.rvt (1.7 MB)

How can i be sure with my script that the value has correlation between door and dimension.
Or they already “find” each other? the interating seems to be not correct.
KOM-Link.rvt (2.4 MB)

Upload please KOM-Link.rvt file too. I can take a look.

setTextDimension(1).dyn (36.5 KB)

2020-07-30_16h49_57
i think i have to update my packages
it works only for 1 dimension

Change level to @L1 or Lacing longest. Or install Rhythm Package.

1 Like

It worked well, i will discuss a workflow with my team, actually it is just working for single dimensions.
if it is multipitch dimensions it does not work, it recognize each text, but the script can t deside where to put height… I think a learnt some stuff.

You should then specify the segments. You should know which segments belong to the door. I don’t have much time to play around but maybe you can find something better.

1 Like