Get Geometry Location

Hi all,
I try to place the family by automatic depending on the mechanical equipment. This mechanical equipment are in linked model, I can place the family and control the X and Y direction. But if the equipment’s are placed in the horizontal wall then my family has to been place on horizontal direction, If the equipment’s are placed in vertical wall then my family has to be place on vertical wall. Also I post the snaps on below. Can any IFU

one help

If your family is hosted, you’ll have to specify the host wall. If it’s just a point placed family, you’ll have to get the orientation of the wall or the orientation of the mechanical equipment. This usually gives you a vector which you need to convert to a rotation.

Hi @Nick_Boyts
I got an answer I

Hi @Nick_Boyts
My family is unhosted , I can place the family If I go to if statements but some electrical elements are in mirrored position means my family are placed in wrong coordination. Because of it takes the maximum value of the boundingbox for mirrored elements I want minimum value.

IFU - 1

Can you share some files for people to test with? It feels like this family wants to be hosted to resolve all of these issues rather quickly.

ya sure I copy the files into onedrive.!AuD7H4WdxTTogQEh4Le3c7ySqGE0

As Jacob mentioned, hosting would make this simpler. You could also get the Mech Equipment’s location point rather than its bounding box (assuming it’s either hosted or its origin is placed against the wall.) There are a couple of ways to remedy this. You just need to find the one that works best for you.

Thanks for your replay @Nick_Boyts
Yes the mech equipment’s location is also right method. In my office some are hosted and some are unhosted elements, So I want to create a two script like hosted and unhosted. By the way if its unhosted means how to write the script. Can u pls give suggestion only.

If I get the equipment location point I can’t rotate my family. Because of I used the bounding box length and width to rotate the family based on the mechanical equipment’s. I slightly modify my script know its works perfectly for unhosted family. But in this script I didn’t change my offset value, When I run the script revit takes 139mm offset as default. And also can you told how to rotate the family if I go to equipment location point.

IFU - 1

The problem with the bounding box is that it won’t work right if you have a rotated element. Place one on a 45 degree angle and see what I mean.

Better solution would be to get the elements transform properties.

yes if I place the a family in 45 degree I want to move the X and Y coordinates at same. Can u please elaborate the elements transform properties I didn’t understand how to proceed it.

hi @JacobSmall
Can u please elaborate the transform properties

I wrote a script for placing electrical disconnects at Mechanical Equipment locations from a linked Revit model. It pulls the XYZ coordinates from each piece of equipment and then uses that information to drive a FamilyInstance.ByPoint node. This places everything at the correct location and elevation, but still has to be manually tweaked into final position. I hope this helps

1 Like

Thank u very much @Bill_Mutert

1 Like

That is what this platform is for, HELPING others