FamilyInstance.ByPoint node issues

I’ve been trying to troubleshoot a script and have identified the ‘FamilyInstance.ByPoint’ built-in node as the problem.

To prove what I’d been seeing, I created a basic script to test things and have managed to replicate the issues that I’m having.

If I use the node to create a new family instance, then it works just fine. However, when I then move the new instance of the family to another position and then re-run the script, in theory creating a new instance, then rather than creating another instance of the family, it moves the first one back to the original point…

The same thing happens using the ‘FamilyInstance.ByPointAndLevel’ built-in node and also through a code block using FamilyInstance.ByCoordiantes and .ByPoint, presumably, as they replicate the nodes?

I do not know how to explain why but here is some help:

I guess you already found out that if you cancel some nodes and position them again ( or even close and re-open the script) it should work as you wish.

Close and re-open the DYN

@Andrew_Casey I got this bad boy fixed :slight_smile:

Here is the code:

import clr

import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc =  DocumentManager.Instance.CurrentDBDocument

import Revit

from Autodesk.Revit.DB import *

def ptslist(obj1):
	if hasattr(obj1,"__iter__"): return obj1
	else: return [obj1]

famType = UnwrapElement(IN[0])
pts = ptslist(IN[1])
lvl = UnwrapElement(IN[2])

elems = []

for pt in pts:
	elems.append(doc.Create.NewFamilyInstance(pt.ToRevitType(True), famType, lvl, Structure.StructuralType.NonStructural))
OUT = elems
1 Like