Open ColinDayOrg opened 6 years ago
Comment by mjkkirschner Thursday Mar 06, 2014 at 14:45 GMT
I have created windows and hosted them on walls using the python node, so I can't see why a built in node wouldn't be able to do the same thing. But I think this requires a multitude of nodes or logic for determining family type and necessary arguments.
Comment by LevL Thursday Mar 06, 2014 at 14:50 GMT
I think the node is generic so it uses API for non-hosted instance placement. I am sure there is a way to see that family is "hosted" and search model for the host on first placement. Re-hosting on re-run might be more problematic as (as example) walls might not be cooked yet by graph.
Comment by jbenoit44 Thursday Mar 06, 2014 at 14:57 GMT
meanwhile I found a document from Jeremy Tammick describing methods to place Family instances. I think we have in build nodes for non-hosted, for level hosted, and we need at least one for element hosted(floor wall etc) and one for face hosted.
Comment by LevL Thursday Mar 06, 2014 at 15:57 GMT
FamilyInstanceCreationData class in RevitAPI wraps the arguments of FamilyInstance for (batch) creation. It seems in some cases it is possible to compute appropriate data for given family and for desired xyz location (find face, level or host by xyz search, could be just allowing such input is acceptable).
Additional XYZ is needed for FamilyInstanceCreationData(Face, XYZ, XYZ, FamilySymbol), FamilyInstanceCreationData(XYZ, FamilySymbol, XYZ, Element, StructuralType). Curve is needed for FamilyInstanceCreationData(Curve, FamilySymbol, Level, StructuralType) and Line is needed for FamilyInstanceCreationData(Face, Line, FamilySymbol).
BTW, batch creation of families should be faster.
I am not sure if Family knows which FamilyInstanceCreationData is needed for it.
Comment by andydandy74 Thursday Mar 06, 2014 at 17:15 GMT
There's a FamilyPlacementType property in the Family class (http://revitapisearch.com/html/7fcd2fda-21c3-9b9b-8ef3-ae2e53e02a05.htm) so in theory a family should know whether it's line-based, face-based or what not, I think.
Comment by LevL Thursday Mar 06, 2014 at 18:22 GMT
Thanks, Andy! Trying to correlate that enum with which FamilyInstanceCreationData method(s) is (are) good for the instance placement of the family.
Issue by jbenoit44 Thursday Mar 06, 2014 at 14:43 GMT Originally opened as https://github.com/DynamoDS/Dynamo/issues/1222
It's more a question than an issue: when placing instances of hosted (face, floor,wall) families with Dynamo, the instances have no host, therefore won't cut the host (intended behavior); and the rehost button is grayed out. My first guess is that it is an API related thing, but could Dynamo reproduce the same behavior as Revit when placing those families?