
Python


Workflow: Family Distribution Part 3
In today’s lesson we will see how to distribute the “Chair” Family over a squared equally spaced grid.
The lacing technique will be used in this lesson to quickly establish the square grid of eleven rows and eleven columns spaced equally by 1000 unit.
We will need to use the following Nodes:
- 4 x Number
- Range
- Family Types
- Point.ByCoordinates
- FamilyInstance.ByPoint
First we will generate a list of X and Y values by using the “Range” Node. These values will specify the number of rows, columns and the distances between them respectively.
By changing the lacing of the “Point.ByCoordinates” Node to Cross Product, we get every combination between each value in the X values list and Y values list, giving us an 11 x 11 grid of points. This is an equivalent data structure to the cross product, except our data is now a list of lists.
From the “Family Types” Node select the “Chair” Family. By connecting the “FamilyInstance.ByPoint” Node input to the “Family Types” Node output and the “Point.ByCordinates“ Node output, we can see that we have 121 chairs arranged in a grid of 11 rows by 11 columns.
The Dynamo Workflow can be downloaded from here
TitleBlockFromSheet
This node will return the TitleBlock instance applied to the input Sheet.
Works with list of sheets.
Uses a little python, basically building up a dictionary with the sheet number parameter of the titleblock elements (as the Keys) and the titleblocks themselves as the Values.
Then performs a search in the dictionary using the Sheet number of the Sheet elements.
In pursuit of avoiding dependencies, a basic implementation of the dictionary is used. For more reliable results, the python node can be replaced with SpringNode’s “Dictionary”.
String.ToTitle
This node will convert the input string(s) to title case.
Source: http://dynamobim.org/forums/topic/title-case-node/#post-40675
http://sixtysecondrevit.blogspot.com/2016/03/stringtotitle-ftw.html
Workflow: Create DynoBrowser Preset file
General Schema:
This workflow assists in the creation of the .JSON file which DynoBrowser needs to set up the presets avaliable to the Revit users.
It uses the three Dynablaster Package nodes:
DynoPresetInputGenerator, DynoPresetGenerator and Dyno.JsonGenerator.
The author of these nodes is no affiliated with DynoBrowser developer. Refer to http://dyno.arcprojects.ru/ for more information
Dyno.JsonGenerator
This is the last of three nodes. See the first and the second before reading this.
Refer to the workflow post for further details.
This node gets a Preset or a list of Presets, and builds the content of the json configuration file.
The author of these nodes is no affiliated with DynoBrowser developer. Refer to http://dyno.arcprojects.ru/ for more information
DynoPresetGenerator
This is the second node of a group of three. Go to the first one before continue reading.
Refer to the workflow post for further details.
As an input will take the preset name, and the input or inputs of that preset.
If more than one input is desired, they need to be grouped as a list and then connected to he “Preset Input(s) node port.
This custom node contains a python node inside.
The author of these nodes is no affiliated with DynoBrowser developer. Refer to http://dyno.arcprojects.ru/ for more information
DynoPresetInputGenerator
This node is the first of a group of three nodes. They are meant to help with the creation of the preset file, which is a .JSON file.Refer to the workflow post for further details.
This file defines for a given “preset”, the inputs which will be accessible from DynoBrowser panel. see more at http://dyno.arcprojects.ru/
With this node, you define an input.
It has three inputs; Name, Value and Description. The node will look for the data type and write it accordingly.
The string creation is held by a python script node:
You can define more than one input, and lace them together into a list and pass it to the next node, which is DynoPresetGenerator.
The author of these nodes is no affiliated with DynoBrowser developer. Refer to http://dyno.arcprojects.ru/ for more information
TextElement Modifiers
This covers the three text element modifiers. Dynamo covers this OOTB for strings, but not for text elements directly.
Input = TextElements (Single or list)
Source:http://sixtysecondrevit.blogspot.com/2015/03/rhythm-textelement-options.html

Workflow: Set Section Box to Scope Box
Using some python coding which you can find here, it is rather easy to set a section box to a scope box in a 3d view.