Generative Design Issue with BBoxCenter(bbox, 0), BBoxArea(bbox) nodes

I am testing generative design scripts shared on the blog, I am currently stuck at the couple of nodes attached below:
I think these nodes are causing the metrics to fail to compute at the time of run.

It anyone could help what could be done for this code block for the designscript to properly process, I would appreciate it.

Thank you so much,

1 Like

This is appears to be happening because the graph which was distributed has the BBoxArea and BBoxCenter nodes earlier in the file than the definition which creates them (that is the import is effectively happening after they’ve already been called). This can happen sometimes if the node creating the definitions is copied after adding annotations, or multiple definitions are created in separate code blocks, and then combined into one as you prep to distribute/document the code.

To resolve, copy the nodes which are erroring out and replace them with a new version thereof and you should be all set.

FYI @colin.mccrone @solamour we might want to get this resolved on the file we distribute with the blog post.


@fracTAL_MR - if you make some modifications to the input of this graph and cause it to execute again, do the errors resolve themselves?

Thank you so much, Jacob. It did resolved the issues with all the code blocks.

However, for the “[Analysis]: Movement, path finding” process, I get a warning: Route.ByPathField operation failed. Attempt to create path field with no destination points in path lattice, as shown below:

I wonder why preview points are all offset from the 3d map?

Are you using the dataset which the graph was originally developed for? It may be that you have links involved which will report their internal origin rather than the location relative to the link instance’s transform.

1 Like

Thank you, @JacobSmall Just not sure why it was doing it when we don’t have linked models. Initially, furniture was from Interior revit model, but I copied all the furniture to the architectural for the script to run. To follow your comment though, I have tried on the Autodesk Revit sample project model to run the script, and it did solve the offset issue. However, I was getting different warnings, and when I export to use generating outcomes, it just spins and no outcome…

COVID-occupancy-for-Revit-GD_03.dyn (1.6 MB)

When a List.GetItemAtIndex fails like that you need to review the data in the node prior to resolve the issue.


Thank you, @JacobSmall I have a quick question about var.
Please see attached for reference:

Not sure why we get the warning although it seems to be right type of data?
Trying to address all the warning as I don’t get any outcome data with infinite circling process when I hit “generate” from “create study”
I wonder if this is causing to fail…Not sure what I can feed here for “var”

I don’t believe that defining a custom definition twice in the same graph is supported… frankly I am shocked that this hasn’t just crashed on every run…

Typically the definitions need to be defined once with a unique name, and called for individually in subsequent code blocks. Try refactoring so that your first created code block builds the definition, and subsequent code blocks call it.

1 Like

yeah, you’ll just get whichever was defined last

1 Like

Thank you, @Michael_Kirschner2 and @JacobSmall
I went back to how it was for definitions and tried again, but same warnings…
And when I export it to generate, it still spins without any outcome.
If you get a chance, please see attached if I am missing something…
I would appreciate it. Thank you in advance.

COVID-occupancy-for-Revit-GD_05.dyn (1.5 MB)
I used the “rac_advanced_sample_project.rvt” in imperial scale model units.

try changing your functions first parameter type annotaiton to :Point[]

Thank you, @Michael_Kirschner2 . I have just updated the Definition code block with Point for var, however, I have run into different issue as shown in attachment below.

I am confused with out of range error I am receiving.

Please let me know what your thoughts are when you have a chance.

Thank you in advance.
COVID-occupancy-for-Revit-GD_05.dyn (1.5 MB)

I am sorry. I have been backtracking and realized there were a couple of custom packages that weren’t matching with script’s version numbers.
I overlooked the issue as the graph itself didn’t have any yellow or red nodes for warnings.
I uninstalled non-matching packages and reinstalled the matching packages and it seemed to work now.

I am now moving on to the actual project that I wanted to test on.
I will keep you posted for further questions.

Thank you for your help.