Dimension Move towards to wall

Hi, I am trying to move the dimension towards walls as in the image.

![2|690x411]

trying like this

I got the curve for the dimension and the walls need to move

any help appreciated.

Have you tried an Element.SetLocation node?

yes did. actually we move the dimension with “Element SetLocation”. the think is need to move dimension towards to wall with particular offset from the wall.
any idea how can move the dimension toward to the wall.

Are the brooms always perfect squares?

Do you mean Rooms?

No its not!

Without a more realistic condition, it’s tough to say. You could try:

  1. Getting the perimeter curves of the room
  2. Finding the walls which are ‘closest’ to the same vector as the dimension was drawn
  3. Pull the longest such line
  4. Offset that line by the desired hold-back
  5. Find the closest points between the dimension curve and the offset curve, and use those points to generate a vector from the dimension to the offset curve.
  6. Move the dimension curve by that curve.

This is going to be VERY dependent on the geometry of your room… there may not be a perfect solution without some degree of user interaction here.

@jacob.small thanks. I will update the workflow.

@Alban_de_Chasteigner for “Element SetLocation” If feed list of elements its fails? any idea?

Hi Vijay,

It is working well for me.

Can you show your graph ?

Partially got it. But not intended to. need equal distance from both direction.