Hi, everyone!
I am trying to place family instances on a face, using the NewFamilyInstance Method (Reference, XYZ, XYZ, FamilySymbol) method.
Here’s the code:
familySymbol = UnwrapElement(IN[2])
refVector = XYZ(1, 0, 0)
for i, plFace in enumerate(IN[0]):
#faceIfb = ItemFactoryBase(plFace)
for surface in UnwrapElement(IN[1][i]):
pt = UnwrapElement(IN[3][i])
ItemFactoryBase.NewFamilyInstance(plFace, pt, refVector, familySymbol)
#ItemFactoryBase.NewFamilyInstance(faceIfb, pt, refVector, familySymbol)
and I get the following error:
however, if I try to get an ItemFactoryBase object from the PlanarFace, here’s what happens:
familySymbol = UnwrapElement(IN[2])
refVector = XYZ(1, 0, 0)
for i, plFace in enumerate(IN[0]):
faceIfb = ItemFactoryBase(plFace)
for surface in UnwrapElement(IN[1][i]):
pt = UnwrapElement(IN[3][i])
#ItemFactoryBase.NewFamilyInstance(plFace, pt, refVector, familySymbol)
ItemFactoryBase.NewFamilyInstance(faceIfb, pt, refVector, familySymbol)
It says it has no public constructor
is it then possible to do that through the API?
edit: forgot to mention what my inputs are
so they are PlanarFaces I already got through the API and didn’t wrap , the family type and centerpoints of surfaces for the location
Cheers