# FamilyInstance.ByCoordinateSystem only works after running 3 times

**URL:** <https://forum.dynamobim.com/t/familyinstance-bycoordinatesystem-only-works-after-running-3-times/95489>\
**Category:** Revit\
**Created:** [November 14, 2023, 9:13am UTC](https://forum.dynamobim.com/t/familyinstance-bycoordinatesystem-only-works-after-running-3-times/95489 "2023-11-14T09:13:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebasHamminga](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@sebasHamminga](https://forum.dynamobim.com/u/sebasHamminga)\
**Post date:** [November 14, 2023, 9:13am UTC](https://forum.dynamobim.com/t/familyinstance-bycoordinatesystem-only-works-after-running-3-times/95489/1 "2023-11-14T09:13:47Z")

</div>

not sure if its a bug or if I’m doing something wrong. But when I run my script to place instances on coordinate systems. The first time I run the script it places the instances slightly off.  
Disconnecting a node places them where they should be (without that node connected) and reconnecting the node places them at the right spot.

 ![first run](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/6/86170e6ade322d1c5c9259fe6d603b25736c6cab.png)  
 ![second run](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/0/40c51551bc9e5d4a041ede6b66f89052345dbf73.png)  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/5/d57191de0e9be28ac51ff456ed7fc6b753122c12.png)

Is there anyone who could help me understand this. Or maybe help me with a work arround?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [November 14, 2023, 12:09pm UTC](https://forum.dynamobim.com/t/familyinstance-bycoordinatesystem-only-works-after-running-3-times/95489/2 "2023-11-14T12:09:01Z")

</div>

Sounds like a transaction issue, but we can’t help without the full graph and dataset to reproduce. I recommend building a VERY simple version of what you are after - say making 3 instances of a family near the origin in a new template - as a starting point.

---

<div class="post-metadata">

**Author:** ![sebasHamminga](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@sebasHamminga](https://forum.dynamobim.com/u/sebasHamminga)\
**Post date:** [November 14, 2023, 1:03pm UTC](https://forum.dynamobim.com/t/familyinstance-bycoordinatesystem-only-works-after-running-3-times/95489/3 "2023-11-14T13:03:58Z")

</div>

thank you for your comment. I’ll try and make it simpeler when I have some spare time to understand CoordinateSystems some better. for now I have found a quick work around by setting the element location afterwards.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/a/9a87b2ee7dd8003bb585111ed6a8588d22ef8dce.png)

this seems to help for now.
