Running Dynamo Script Whilst in Family Editor Mode

Hi All,

I am facing an issue caused by the inability to run a script whilst in the family editing environment.

The Problem:

I’m working with an In-Place Mass family in which I’ve created 3 divided surfaces.


I then placed a number of instances of 1 Generic Model Adaptive family, hosted to the nodes of the divided surfaces.

My intention was to then leverage Dynamo to randomize the Family Types of the Adaptive Generic Model family to create something like the below.

The issue I had is that when I run my ‘randomizing’ script whilst editing the in place mass, it doesn’t actually run until I have clicked the Finish button. And when I run the script when in the normal project environment, it is not able to dig into the family and modify the elements within it.

I was able to achieve what I wanted by creating the divided surfaces within the In-Place Mass environment, then finishing the Mass. I then applied the Adaptive Generic Model families to the divided surfaces whilst in the normal project environment and then ran my script - which worked fine - or so I thought.

The issue is that I’m not happy with the density of the geometry, and so I’d like to make the output less dense. My first thought was to simply change the spacing of the U and V grids on the divided surfaces to reduce the density. However, because I placed the generic models within the project environment and not within the In-Place Mass environment, there appears to be no link/connection between the Adaptive Generic Model families and the divided surfaces. The Adaptive Generic Model families aren’t actually hosted to the divided surface nodes, and so when the U and V spacing of the divided surfaces are modified, the Generic Model Adaptive families do not update to reflect these changes.

Hope that all made sense?

As you can appreciate, it is not much use having the Divided Surfaces if the attached geometry doesn’t update with it…

Essentially I’m querying if there is a way to run a script while editing a family, or to have a script make changes within an in-place family when not editing it. Is there a known workaround for the issue I’m having?

Thanks in advance!

As far I know you cannot run Dynamo while a command is in execution in Revit. I would suggest you to redo your in place mass to a Conceptual Mass and load it later to the project.

2 Likes

Hey @architectcoding,

Thanks for the reply.

Your suggestion works, as I achieved what I was trying to do via your method.

There is 1 drawback to this method though, which is that one can not create divided surfaces from imported (.sat) geometry when in the Conceptual Massing environment.

It works fine in the example I provided, as the divided surfaces can easily be modeled in the Massing environment. However I have another example where I would like to import curved geometry from rhino, divide the surface, apply the adaptive components and then use dynamo to randomize the pattern.

Despite my best efforts, it seems it is only possible to divide an imported surface if you:

  1. Create an In-Place Generic Model.
  2. Link (not insert) the .sat file.

Not sure if there is a solution to this…

Have you tried to import the geometry Dynamo, divide the surface with, for example with Lunchbox, place the adaptive components?

https://primer.dynamobim.org/05_Geometry-for-Computational-Design/5-8_importing.html

I think it is worthy a try, it gives you a ton of flexibility beyond the UV OOTB from revit.