Element.GetLocation and FamilyInstance.ByPoint not Lining Up

The script I am working on is supposed to grab the location of an element in a linked file, take those coordinates and use it to create a new family in the same location within the live project. I grab the coordinates successfully. I create the new element and even rotate it into the same orientation as the original but I can not get it in the same location no matter what I try. I had a segment in here to switch the survey and base point coordinates but it made everything much worse. Since the projects were made using different templates, I was thinking that there could be an issue with the internal coordinates of the projects not matching. I recreated both files from the same file, linked them together and the new parts were in the same place as before. The screen grab below is my script. Any suggestions?

Hi @Tgoodale

Some basic rules to be followed on forum if you want others to help you.

  • Show complete graph.
  • Show values of each node.
  • Show related warnings if you have any.
1 Like

Sorry @Kulkul. I figured showing the relevant portion was better then a larger image. There are no warnings when I run it and I’m not entirely sure what you mean by “values of each node”. i have expanded to show the lists if that is what is meant. If not, let me know and I will get them.

@Tgoodale Yes that’s what we need.

1 Like

Did you acquire coordinates from the linked model?

The coordinates that I am acquiring are from the door that is in the linked file.

Could you drop your linked model and project file in one of the dropbox and share the link here.

That is the location of them.

Edit: I updated the New_Test file just now. I forgot to load the lentil into it.

So, I wrote and ran a script to compare the Site Base Point and the Site Survey Point. From this script, the linked file and the live file both have the same values.

@Kulkul Thank you for your help! I have come to the realization that the family I was trying to place was a line based family. When I try running the script with a regular generic model [what we will ultimately use this with] it works as intended. Thank you again for your help with this!

@Tgoodale No Problem :wink: . Could you please mark the post as solved to this reply. Here is the dyn file for line based family Tim’s Door Script(Kulkul).dyn (22.9 KB).