Hi Everyone , i’ve been trying for a week and stuck , error it gives is No matches given arguments for NewFamilyInstances- Class ; what i understand is that the input Face that i have given is treated as list and not face
Following is my code :
import clr
clr.AddReference(‘RevitAPI’)
clr.AddReference(‘RevitServices’)
from Autodesk.Revit.DB import XYZ, FamilySymbol, Face, Transaction
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
Unwrap Dynamo inputs
face = UnwrapElement(IN[0]) # Face or list of faces
location = IN[1] # XYZ location
reference_direction= IN[2] # XYZ reference direction
symbol = IN[3] # FamilySymbol
Get the current document
doc = DocumentManager.Instance.CurrentDBDocument
Start a transaction to create a new family instance
TransactionManager.Instance.EnsureInTransaction(doc)
Create the new family instance
new_family_instance = doc.Create.NewFamilyInstance(face, location, reference_direction, symbol)
TransactionManager.Instance.TransactionTaskDone()
Output the created family instance
OUT = new_family_instance
Please help , Learned many new things while searching solution for this already