Dynamo Door Tag

Hi Dynamo Users,

I want to place a door tag with Dynamo.
I’m having trouble finding the target point of my label.
I want to place it so that it is parallel to the opening direction of the door and put it exactly in the middle of the screenshot.

Is it possible?

It most likely is, but if you don’t show your graph the comunity can’t help you. What do you have? Are you stuck at something or do you need somewhere to get started?

If it’s the later, I would approach this by getting all doors from the category, then filter them by if their tagged or not (I don’t know yet how you would approach this) and finally try to find the direction of the remaining doors.

Hİ ,

You are right.I have now added the script. I could not do anything after that.

Thnaks for helping.Door_Tag_Test0.dyn (16.7 KB)

Assuming the insertion point is where I’d expect it to be:

  • You’ll have to get that location, find the facing direction of the door (Dynamo Dictionary).

  • Pull through width of the door and divide that by two (remember family type vs instance here).

  • Do some math to get the translation distance. You have side A and B from 1/2 of the width, so A^2 +B^2 = C^2 to get the length you need to move the point.

  • Now get the flip status (I’d flipped, if not) by pulling the handing (archilab has nodes for this I believe). Use and If node where if right you may want to return -1 and otherwise return 1, but I may be backwards in my mind here so be ready to swap those.

  • Multiply 45 by the 1 or -1 value to get 45 or -45.

  • Rotate the facing direction by the 45 or -45 about the Z axis.

  • Translate the door’s origin along the rotated vector by the translation distance (the A^2 + B^2 = C^2 step).

  • Make the tag there.

  • Rotate the tag by the door’s facing orientation angle (from the global X axis).

It sounds like a lot because it is. Add in that the method to get the location can be invalidated by a few factors (what if you have doors which have adjustable swing angles? What if you have double doors? What if you have multi-leaf doors? Etc.) and things get crazy. If your family library is set up in another way (ie: panel as a shared, nested family) you might be able to simplify this quite a bit (ie: get the lines in the family, offset by a known distance, find mid point, place tag, rotate).

1 Like

Hello, A script of this could go a long way to help, if you dont mind.

Please read the forum guidelines, this isn’t a free work forum:

I’d suggest trying to get partway into this and then making a new thread for assistance when you get stuck. If you’re new to Dynamo, put some effort into learning it before this as well.

1 Like