Creating a family from a model in-place

Hello all, i’m trying to automate the process of generating a family from a model in-place extrusion (i work with pointclouds, so this is one of the only ways to model everything we need, but then we can’t parametrise it, so we need to convert it to a family). I think that the workflow would be get the geometry of my model, then creating a familytype with the FamilyType.ByGeometry, but then, how do i save it as a .RFA from inside dynamo? And what is the best way of getting my geometry? I worry because it can be literally anything that exists in real world and thus, don’t follow any pattern.

Have a look at the Sastrugi package.
There are a lot of nodes that deal with point cloud data in there.

For the conversion see this screencast:

@JacobSmall

We are currently using this workflow, but just last week someone of my team spent 5hr+ doing this like 300 times, and I was looking for a way to automate it with dynamo, but for everything i have searched, it looks like i can’t mess inside the “edit in place” with the API, so i’m feeling a little bit cluesless here

You can’t call the API while a transaction is open as the database only allows alterations of one item at a time, and ‘edit in place’ is a transaction so that will not work.

For an automated ‘break out’ you’re going to have to go full add-in here and even then I don’t know that it will work. I am rather confident that Dynamo won’t be robust enough to ‘just do it’. You may find that if you ‘nest your families into families’ or otherwise look into grouping combinations that things get easier.

thanks, i was in a rabbit hole trying to figure out why i couldn’t make anything work inside the edits.

i’m trying to workaround this with groups right now, using some knowledge i got in the forum, and right now i’m stuck with not being able to call the group I made into a python

"
import clr;
clr.AddReference(‘ProtoGeometry’)

from Autodesk.DesignScript.Geometry import *

clr.AddReference(‘RevitAPI’)

import Autodesk

clr.AddReference(‘RevitServices’)

import RevitServices

from RevitServices.Persistence import DocumentManager

from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

#Close all transactions

trans = TransactionManager.Instance

trans.ForceCloseTransaction()

paths = IN[0]

group1 = IN[1]

#unwrap the Dynamo elements

fams = map(UnwrapElement, fams)

for i in xrange(len(fams) ):

famDoc = ??

famDoc.SaveAs(paths[i])

famDoc.Close(False)

OUT = 0
";

i got this python script for saving family in dynamo, but i can’t seen to call the group inside a new variable so I can SaveAs it like a .RFA, i’m not so versed in python, and thought i could call a group by his Id with doc.GetElement(group1), group1 being the element ID i got from my group. Can you help here?