Is it posible to create FamilyInstance.ByCoordinates using Python? I’m trying to do it in Python because I’m creating it from a file, and I need to use a lot of parameters.
Thans you in advance
Is it posible to create FamilyInstance.ByCoordinates using Python? I’m trying to do it in Python because I’m creating it from a file, and I need to use a lot of parameters.
Thans you in advance
Sure it’s possible:
http://revitapisearch.com/html/2c54b765-d7a0-b638-419a-241f176940a8.htm
But you could just as well use the existing node to first create your family instances and then set the params later.
Here is a python snippet that worked for me @OrsHH
Works on 2015, haven’t tested in other versions.
from Autodesk.Revit.DB.Structure import StructuralType
doc = __revit__.ActiveUIDocument.Document
# Transaction
instance = doc.Create.NewFamilyInstance(location_pt [XYZ point ] ,
fam_symbol [symbol object] ,
level [ optional?] ,
StructuralType.NonStructural)
# End Transaction