Thank you for posting this.
I was also going through the tutorial and it was not working either.
@Kulkul’s script, however, did not work for me as is. It works, though, if I only add the the snippet of code that activates the familytype. For some reason I cannot understand my Python node was disliking the new loaded modules.
my full script below.
# Enable Python support and load DesignScript library
from Autodesk.DesignScript.Geometry import *
#Import Revit API
from Autodesk.Revit.DB import *
#Import Manager Classes
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
# The inputs to this node will be stored as a list in the IN variables.
familytype = UnwrapElement(IN)
output = 
# Place your code below this line
doc = DocumentManager.Instance.CurrentDBDocument
if familytype.IsActive == False:
for x in range(0,100,10):
fam = doc.Create.NewFamilyInstance(XYZ(x, 0, 0), familytype, Structure.StructuralType.NonStructural)
# Assign your output to the OUT variable.
OUT = output