hi @c.poupin ,
Need to place the wall based electrical receptacles in the electrical file from the architectural model. but I am having the Location Only, since in Architectural file its work plane based. I need to get the nearest wall face.
Kindly Advice me.
From the FamilyInstance.Location how can I get the nearest wall face?.
Thanks & Regards,
SP Dhilip Seshan.FamilyInstance By Face.dyn (11.2 KB) link architectural file R20.rvt (1.4 MB) working electrical file R20.rvt (3.0 MB)
Hello @dhilipseshan
Your request is quite complex.
Here are some steps that will get you started:
collect the walls of the linked model
get the boundingBoxes of these walls (with an offset)
check for each instance of Families if it is in the boundingBox
if so, find the wall and the closest surface with the DistanceTo () or Face.Project () method (geometry of Faces to extract)
define the point on the surface
create a reference (in the host model) from the Face in the linked model
create the instance following an orientation to be defined
Added to this is the management of transformations if the models are not aligned.
Gentle reminder how to ask help on forum
Here are some more additions.
First, do not ask anyone to do your job! This is a help forum to ask for help with things that you cannot figure out on your own, but actually tried. Most important, please remember always come back if anyone is trying to help you.
If your graph provides you an error messages, please reveal the content of it as a part of the image. Please put ‘Watch’ nodes and notes in the graph describing what essential parts does. The notes will help you to remember what you did…
1 Like