I have several elements in Revit, and I need to categorize them based on the placement of the hosted families in each element. I am trying to create a coordinate system at zero parameters of each element’s location curve and find the relative coordinates of the element’s location curve start point, and the hosted families in the same element by using the created local coordinate system so I will always get the same vector when I connect the start point of the location curve line to the location of the hosted families, but for some reason I do not understand, I do not get the same vectors, even though my elements are identical.
Could you please help me to understand where I am doing it wrong?
To determine the position of each child-element, in this case the windows and doors, relative to the host-element, in this case the walls, you need to create a local coordinate system for each wall in a logical position, i.e. the insertion point (or startpoint of the curve) of the wall.
When you then have those coordinate systems you need to transform the insertion points of the windows, doors, etc. to match the newly created coordinate systems. If you’ve done that you should be able to compare the locations of those child-elements.