Midpoint between 2 points

Midpoint between 2 points

Anonymous
Not applicable
2,187 Views
1 Reply
Message 1 of 2

Midpoint between 2 points

Anonymous
Not applicable

Is there a macro available that can place an instance of an air terminal at the midpoint of a ceiling tile, by using the intersecting, opposite corners of a ceiling grid? We use a .dwg background in order to locate our GRDs and we currently drop an instance of our GRD at an intersecting corner and move the object in 2 directions to obtain the midpoint.

 

On a side question, can you assign keyboard shortcuts to a macro? 

0 Likes
2,188 Views
1 Reply
Reply (1)
Message 2 of 2

joshua.lumley
Advocate
Advocate

To get the midpoint between two points in code is a simple average: midpoint = (pt1 + pt2) / 2 ;