73
7/23/2019 Dynamo Visual Programming for Design 8938 http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 1/73 Dynamo: Visual Programming for Design Contents Description.......................................................................................................... .... 3 Dynamo Visual Programming .................................................................................... 3 Getting Around in Dynamo ....................................................................................... 4  The Basics ........................................................................................................... 4  The Dynamo Interface.......................................................................................... 4 A. Pulldon !enus ........................................................................................... " B. #earch Bar ................................................................................................... " $. %ode &i'rary ................................................................................................ " D. (or)space................................................................................................... " *. *+ecution Bar ............................................................................................... "

Dynamo Visual Programming for Design 8938

  • Upload
    ku-bi

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 1/73

Dynamo: Visual Programming for Design

ContentsDescription..........................................................................................................

.... 3

Dynamo Visual Programming.................................................................................... 3

Getting Around in Dynamo....................................................................................... 4

 The Basics........................................................................................................... 4

 The DynamoInterface.......................................................................................... 4

A. Pulldon !enus........................................................................................... "

B. #earch Bar................................................................................................... "

$. %ode &i'rary................................................................................................ "

D.(or)space..................................................................................................."

*. *+ecution Bar

............................................................................................... "

Page 2: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 2/73

$oncepts, Definitions, Terminology........................................................................ "

(or)space ....................................................................................................... "

%odes.............................................................................................................. -

(ires...............................................................................................................

Ports ...............................................................................................................

Page 3: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 3/73

Dynamo: Visual Programming for

Page / of "-

Program0lo...................................................................................................

Directionality of *+ecution................................................................................. 1

$ustom%odes.................................................................................................. 1

*+amples ................................................................................................................ 2

$reate a Point, or ello (orld56 In Dynamo........................................................ 78

Placing 0amilies ith #e9uences, anges, &ines and Grids..................................... 74

%ested &ists and Basic Data !anagement

............................................................ 72Ad;anced 0amily Placement: Adapti;e $omponents............................................. //

Get and #et 0amily Instance Parameters.............................................................. /-

Basic !ath ith the 0ormula%ode....................................................................... /1

$olor................................................................................................................. 3/

DataInterop...................................................................................................... 3-

Attractor Pattern................................................................................................ 4/

Python: #cript a #ine (a;e................................................................................ 4-

#haring and eusing Algorithms ith the Pac)age !anager................................... "8

!any !ore*+amples.......................................................................................... ""

(hat *lse $an Dynamo Do<................................................................................... ""

(here to &earn !ore a'out Dynamo....................................................................... "-

Page 4: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 4/73

Description These tutorial ill demonstrate ho to use Dynamo Visual Programming for

Autodes)= e;it= softare and Autodes) Vasari. The la' ill pro;ide

users ith resources and step>'y>step e+amples for automating geometry

creation, ad?usting family parameters using e+ternal data, and sharing

information ith different design platforms.

Dynamo Visual Programming$omputational Design refers to the a'ility to lin) creati;e pro'lem sol;ing

ith poerful and no;el computational algorithms to automate, simulate,

script, parameteri@e, and generate design solutions. $omputational Design

has had a profound impact on Architectural practice in recent years. Design

practices, large and small, ha;e 'egun to in;est in ne computational

capa'ilities that allo them to customi@e their process and pursue ne,inno;ati;e design agendas. $omputation might 'e le;eraged for a ;ariety of 

tas)s such as automating a redundant production process or to construct an

e+pressi;e form>generator. egardless of the end>use, hat is clear is that

designers need frameor)s that let them construct their on tools.

Visual Programming &anguage6 is a concept that pro;ides designers ith

the means for constructing programmatic relationships using a graphical user

interfaces. ather than riting code from scratch, the user is a'le to

assem'le custom relationships 'y connecting pre>pac)aged nodes together

to ma)e a custom algorithm. This means that a designer can le;eragecomputational concepts, ithout the need to rite code. Dynamo is an open

source Add>in for Autodes) Vasari and e;it. Dynamo allos designers to

design custom computational design and automation processes through a

node>'ased Visual Programming interface. Csers are gi;en capa'ilities for

sophisticated data manipulation, relational structures, and geometric control

that is not possi'le using

a con;entional modelling interface. In addition, Dynamo gi;es the designer

the added ad;antage of 'eing a'le to le;erage computational design

or)os ithin the conte+t of a BI! en;ironment. The designer is a'le to

construct custom systems to control Vasari 0amilies and Parameters

Dynamo e+poses a fundamentally ne ay of or)ing ith geometricinformation ithin

Autodes) Vasari and e;it. Csers can create control frameor)s for creating,

positioning, and ;isuali@ing geometry. The Visual Programming frameor)

Page 5: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 5/73

lets the user create uni9ue systems and relationships and e+pand ho BI!

can 'e used to dri;e design ideation.

Page 6: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 6/73

Getting Around inDynamo

The

BasicsDynamo is primarily a plug>in for Autodes) e;it and Vasari. It or)s ine;it /873,

/874 and Vasari Beta 3, and this tutorial re9uires that you ha;e one

of these applications installed. Dynamo can also run as a stand>alone

application ith all the list and logic functionality, and ith some

e+perimental geometry tools a;aila'le using the Autodes) #hape !anager

)ernel. (or) is also 'eing done to port Dynamo functionality to other

platforms.

Dynamo is open source under the Apache /.8 lisence. The softare can 'edonloaded from h t t p : EEdy nam oB I! .or g, and source code is a;aila'le at

htt ps: EEgit hu'.comEi)eoughEDynamo .

The Dynamo Interface

A

B

C

D

E

Page 7: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 7/73

A. Pulldon!enus

Cse the 0ile pulldon to Fpen dynamo files, ma)e ne ones, #a;e>As a ne

file name, and e+port an image of your current or)space. Cse edit to do

copyEpaste operations, create ne custom nodes, and add comments. Cse

the Vie pulldon to acti;ate 'ac)ground pre;ies, ;ie the console logH,

and change ire appearance.

B. #earchBar

Cse the #earch Bar to nd loaded%odes

$. %ode&i'rary

Broser for pic)ing nodes. $lic) on a node title to add to the Dynamoor)space

D.(or)space

 The (or)space is the main en;ironment for creation of Dynamo ;isualprograms. The ome (or)space is the default or)space. (hen a user

creates or edits a custom node, it ill appear as a ne ta'.

*. *+ecutionBar

 The *+ecution Bar allos the user to run or e+ecute the currentor)space

 The un AutomaticallyJ chec)'o+ ill cause the or)space to run if the

user changes the or)space or any of the atched e;it *lements in e;it orVasari The De'ugJ chec)'o+ ill in;o)e a more detailed method of e+ecution

Concepts, Definitions,Terminology

Page 8: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 8/73

(or)space

 The acti;e Worspace is the area here you interact ith the elements of 

your ;isual program. (hen you start Dynamo you are in a 'lan) !ome

Worspace. Kou start creating your ;isual program here 'y placing "odesand connecting ith Wires.

Page 9: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 9/73

 Kou can sa;e the (or)space as a #dyn, or Dynamo file for later reuse.

Dynamo files can 'e opened from the 0ile menu or the $amples menu.

Fpening a Dynamo file clears the pre;ious or)space and opens the le as

the ne acti;e (or)space.

A (or)space is e+ecuted hen you press the un 'utton or ill e+ecuteautomatically if 

you acti;ate the un Automatically6chec) 'o+

By default, the 'ac)ground of the or)space displays all geometric output of 

the graph. This 'ac)ground can 'e turned oL in the ;ie menu. To

na;igate the 'ac)ground, press $ntrl>G, to return to graph na;igation, press

$ntrl>G again.

%odes

"odes are the o'?ects you place and connect together ith Wires to

form a ;isual program.

%odes can represent e;it *lements li)e !odel &ines oreference Points.

%odes can also represent operations li)e !ath

0unctions. %odes ha;e inputs and outputs.

 The colors of %odes change to indicate

state.

a. Frange %odes are ell>connected and ha;e all of their inputs successfully

connected. They are part of the acti;e Program 0lo.

'. Grey %odes indicate one of / states. Generally it means they are inacti;e

and need to 'e connected ith (ires to 'e part of the Program 0lo in the

acti;e (or)space. Dynamo also allos for users to pass only partially

connected nodes to donstream functionality, alloing for more comple+

interactions. This state is also represented in grey

c. ed %odes are in an *rror state. Kou can see hat the error is 'y

ho;ering your mouse o;er the node and reading the tooltip.

d. $urrently selected %odes ha;e an a9ua highlight. Kou can drag selected

nodes around the or)space or right>clic) to see their properties.

Page 10: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 10/73

e. %odes ha;e input Ports on the left side and output Ports on the

right side. Directionality of e+ecution and program o usually goes left to

right.

Page 11: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 11/73

(ires

(ires connect 'eteen %odes to create relationships and esta'lish a program

flo. Kou can thin) of them literally as electrical ires that carry pulses of 

information from one o'?ect to the ne+t.

(ires connect the output Port from one %ode to the input Port of another node.

 Kou create a (ire using the mouse left>clic)ing on an output Port and

dragging ith the mouse 'utton held don, then connect to the input port of 

another node. (ires appear as dashed hile 'eing dragged and solid lines

hen successfully connected. To disconnect a (ire, left>clic) on the output

%ode and pull the (ire aay.

Ports

Ports are the light rectangular areas on %odes, they are the receptors

for (ires. Information os through the Ports from left to right. a. Inputs

Ports are on the left side of the %ode. '. Futputs Ports are on the right side of 

the %ode.

Ports are e+pecting to recei;e certain types of data, for e+ample a %ode

might or) on Point o'?ects or &ine o'?ects. Try to connect li)e outputs to li)e

inputs MKN>OMKN for e+ampleH. Passing a &ine o'?ect into the input Port of a

%ode that is e+pecting a Point ill result in an error.

 Kou can tell hat a specific %ode is e+pecting to recei;e or to return from the

te+t la'el. If the name is cut off, simply ho;er o;er the port and a tooltip ill

appear.

Program0lo

(or)spaces ha;e a Program 0lo that represents here to start program

e+ecution, hat to do in the middle and ho to )no hen program

Page 12: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 12/73

e+ecution is complete. (hen you press un6 Dynamo e+ecutes the ;isual

program according to the esta'lished Program 0lo.

Page 13: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 13/73

Directionality of *+ecution

 Typically Dynamo ;isual programs are e+ecuted from left to right and you can

read the program that ay to understand the Program 0lo.

 There are some e+ceptions as you get into ad;anced topics li)e recursion, 'ut

for the purposes of this class simply read from left to right.

$ustom%odes

 Kou can create your on reusa'le %odes in Dynamo ithoutprogramming. These %odes can 'e used in the current (or)space or in other

(or)spaces on your machine. Kou can also share these %odes ith others.

$reate ne nodes from 0ileO%e $ustom %ode or 'y selecting e+isting nodes

in the or)space and in *ditO$reate %ode 0rom #election or right clic) in the

can;asH. Gi;e the node a name and a category selecting from the pulldon

or 'y entering a ne name. %otice the 'ac)ground color changes hen you

are editing a user>created node.

$ustom %odes appear in the "ode %ist li)e the other nodes. Kou candou'le clic) to

edit these nodes at any time or 'y selecting their name from the Vie menupulldon.

$ustom %odes are graphically distinguished from other %odes 'y loo)ing li)e

a stac) of nodes. (hen you see a node ith a dotted shado underneath, it

is an indication you can dou'le>clic) on it to edit the contents.

 Kou can share nodes you create ith other colleagues 'y using Pac)age

!anager tools. By selecting a custom node, and going to the Pac)age

!anager in the dropdon menu, you can pu'lish the node for others to use.

#imilarly, you can search the online catalogue for functionality pu'lished 'y

other users.

$ustom %odes can 'e nested inside of themsel;es to create recursi;e

functionality, such as 0i'onacci se9uences or fractals.

Page 14: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 14/73

Worflo& The acti;e en;ironment that ill 'e e+ecuted. The aggregation of 

the acti;e or)space, python scripts and all dependent user>created nodes.

Page 15: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 15/73

E'amples

 The folloing or)os use Dynamo les that are located in the elp

menu of the application under #amples. !any ha;e associated e;it

family rfaH and pro?ect r;tH files that, 'y default, are located at

$:Autodes)Dynamo$oresamples. All the e+amples in this document

can 'e used in either e;it or Vasari.

0or ease of opening rfa and r;t les, you might ant to add this folder to

your Places open dialog.

Page 16: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 16/73

Create a Point, or (!ello World)* InDynamo

$reating a reference point is the most 'asic operation you could ant to do in

Dynamo. Its the ;enera'le ello (orld56 for the application. To get there,

you ill need to learn some high le;el concepts and understand some of the

'asic principles of or)ing in the e;it and Vasari en;ironment

•  &earn ho to launch Dynamo in the right en;ironment for your needs

• 

 Tour the Cser Interface, Cnderstand searchE'rose, and na;igate theDynamo

(or)space

• 

Place nodes and ire them together

•  &earn a'out the difference 'eteen geometry and e;it *lements

A or)space for creating a dynamically controlled:eference point

7. &aunch Vasari.

/. (e are going to 'e placing eference Points, hich can only 'edone in the !ass, $urtain Panel 'y Pattern, or Adapti;e $omponent

family en;ironments not the pro?ect6 or .r;t en;ironmentH. $lic)

O %e O 0amilyO !ass.rft. Fr, in the recent documents screen, under

0amilies, $lic) on %e $onceptual !ass6.

Page 17: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 17/73

3. Dynamo ill operate on the .rfa or .r;t file that is acti;e at the time

Dynamo is launched. %o that e ha;e a !ass file open, go to Add>ins

ta' and launch Dynamo

4. 0rom the Dynamo 0ile !enu, go to +ile$amples -# Create Point

create point#dyn

". %otice a couple of nodes ./0 and 1ef PointH in the or)space. 1un

to create a single eference Point at 8,8,8.

-. There is a difference 'eteen an MKN and a eference Point. AnMKN is a

coordinate point in space, hile a eference Point is a full>fledged e;it

*lement ith many aspects and associated meta>data.A'stract geometry, li)e this MKN, is displayed in the 'ac)ground of the Dynamo

or)space. Kou can toggle 'eteen na;igating the 'ac)ground 3d

space and the flat graph 'y pressing $ontrol>G. Kou can also turn this

pre;ie oL in the Vie menuO Bac)ground 3d Pre;ie.

. #elect and mo;e nodes 'y using the left mouse 'utton.

Page 18: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 18/73

a. Type Delete in order to delete a node or right clic) andclic) Delete.

Page 19: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 19/73

'. The right clic) menu ill also sho a num'er of otherfunctionalities.

$lic) on the help 'utton to see more information on a

selected node c. #elect all the nodes and right clic) to set

their alignment.d. Noom in and out using the mouse heel and pan using middleclic) and

hold

1. %o e ill learn ho to re>ire the or)space to add moreinputs:

a. Type %um'er6 into the search 'ar to find the "um2er node

to add it into the (or)space. This can 'e done 'y either typing

enter ith the num'er node selected in #earch or clic)ing the

node in the node li'

'. 0ind the "um2er $lider node and add that as ell

c. Fn the ./0 node, select the end of the ire connecting to the / port.

Drag it oL into space to disconnect. Do the same for the 0 port.

d. $onnect the ne "um2er node to the / 

port and the "um2er $lider node to the 0 port.

e. At the 'ottom of the can;as, chec) un Automatically6.

f. !o;e the slider to see the point mo;e around

Page 20: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 20/73

g. In the Vasari tool'ar, pic) !odelO DraO#pline Through

Points, and dra a spline ith one of the points using the

Dynamo created eference Point. !o;e the %um'er #lider and

see 'oth Dynamo created stuff and manually created stuL 

update.

Page 21: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 21/73

h. #elect the Dynamo created eference Point and, in Dynamo,right clic) in

the can;as and pic) 0ind %odes from selected elements6

2. $reate a $ustom %ode 'y #electing the MKN and eference Point

nodes, then right clic) out in the can;as, and pic) %e %ode from#election. %ame your custom node something meaningful.

78. In the *dit !enu, pic) $reate %ote to annotate your or)o or type$ntrl>(H.

Dou'le clic) on the %ote to edit it or edit from the right clic) menuH

Page 22: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 22/73

Placing +amilies &ith $e3uences, 1anges, %ines and Grids

 This tutorial aims to introduce the folloing:

• 

o to use node %acing to e;aluate the mem'ers of a list in different

ays

•  Generate lines, grids, and lattices of eference Points

• 

Place family instances ith Dynamo

Dynamo after opening the createpointQse9uence.dyn f ile

7. $lose any other open Vasari files

/. 0rom Vasari, $lic) O FpenH.

3. %a;igate to C45Autodes5Dynamo5Core5samples

4.Fpen 6ass &ith %oaded +amilies#rfa from the $amples directory

". 0rom the Dynamo elp menu, go to $amples -# Create Point

create

point7se3uence#dyn

-. it the un6 'utton to see the folloing:

Page 23: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 23/73

A se9uence of points created 'y running thise+ample

. ight clic) on the "um2er $e3uence and select !elp8 to seehat )inds of inputs and outputs the num'er se9uence e+pects.

1. %otice the little icon in the 'ottom right corner of the MKN node. This indicates the Lacing for this particular node. &acing allosyou to automatically apply the node to the se9uence created'y the %um'er #e9uence node.

 The MKN node ith lacing set to3&ongest6

2. Try changing the &acing strategy to +irst 'y right clic)ing on theMKN node and selecting 0irst. Kou should see the icon in the'ottom right corner of the node change.

78. it un again. Kou should see a single point located at theorigin.

Page 24: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 24/73

 This is 'ecause the MKN node is only e;aluating the firstelement in the list created 'y the %um'er #e9uence node.

Page 25: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 25/73

77. $hange the lacing on the MKN node to Cross Product. If youhit un again, you should again see a ;ertical line of regularly spaced points.

7/. $lic) the output port 'utton on the %um'er #e9uence node and

connect it to the MKN node 'y clic)ing on the K input. Kouror)space should loo) li)e this:

A or)space for creating a grid of MKN points in the KN plane

73. By running again, you should see an orthogonal grid in the KN

plane, li)e this:

A s9uare grid of MKNpoints.

Page 26: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 26/73

 Kou can e+periment 'y connecting the se9uence to the M and Kports to get a plane in MK plane.

Page 27: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 27/73

74. $onnect all 3 input ports of the MKN node to the output of the %um'er #e9uence %ode and it un. Kou should get a cu'ic3d lattice:

A cu'ic lattice of MKNpoints.

7". &ets scale 'ac) a 'it and go 'ac) 'y connecting the %um'ernode, set to 8, to the N port of the MKN node. (ell ha9e :usta grid in the ./ plane.

%o e ill e+tend this or)space to do something more useful than ?ust

creating points. (ell place 0amily Instances5

7-. Go to the $earch Bar and type in (+amily*, this filters the

a;aila'le nodes don and allos easier access from the "ode %ist#

 Kou should no only see nodes related to 0amily6.

7. Add one Create +amily Instance node and one $elect +amilyType node

into the or)space. &oo) at the elp menu for 'oth of these nodes'y right clic)ing.

71. $onnect the $elect +amily Type output to the Create +amilyInstance

typ6 input port.

72. %o select the Cone 0amily Type from the pulldon on #elect 0amily

 Type and connect the MKN output from the ./0 "ode to the MKN

Page 28: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 28/73

input of the Create +amily Instance node. Kour or)space should

loo) li)e this:

Page 29: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 29/73

 The or)space after adding the #elect 0amily Type and $reate 0amily

Instance nodes

/8. it 1un and you should see something li)e this:

A grid of cone families laid out on the MKplane.

/7. *+periment ith different ;alues for the num'er sliders or

different family types. By turning on 1un Automatically you can do

this interacti;ely.

Page 30: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 30/73

"ested %ists and Basic Data6anagement

• 

Cnderstand the importance of lists in any standard or)o

• 

*+plore some of the tools for ma)ing data do hat you ant it to do

 This tutorial gi;es a ;ery 'rief introduction to the process of sorting

data in lists. Inde+ed lists are the 'ac)'one of algorithmic design, and

getting control of 'oth the tools and concepts is essential for achie;ing e;en

moderate comple+ity.

7. 0rom Vasari, $lic) O FpenH.

/. %a;igate to C45Autodes5Dynamo5Core5samples

3. Fpen 6ass &ith %oaded +amilies#rfa from the $amples directory

4. Go to Add>ins ta' and launch Dynamo. If you already had it open,close and re> open it to re>associate Dynamo ith the nely opened

.rfa le.

". 0rom the Dynamo elp menu, go to $amples -# Create Point create

point7se3uence#dyn

-. unning the or)space ill create a ;ertical line of +y@s, e ill no

ad?ust this to ma)e a hori@ontal grid of +y@.

. Cnplug the @ input for the +y@ node, and ire the %um'er ange node

into the M

and K ports of the MKN node. ight clic) on the N port of the MKN andacti;ate

Cse Default Value6:

1. Right click on the XYZ Node and set Lacing to Cross Product. Run

the workspace and inspect the results, a nested list or list of lists.

Page 31: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 31/73

2. Now we will extract a single row of information from the nested list. n the

search !ar, find "et #rom List, or !rowse to the node in Core$Lists$%uer&.

'xtract the first row of data !& passing the list of lists into the "et #rom List (List)port, and choosing the first index row !& passing in a * num!er node. Pick the

"et #rom List node to see the row isolated in the !ackground pre+iew.

78. Cop&Paste &our Num!er and "et #rom List nodes, and place a -ranspose

node in !etween the XYZ and "et #rom List. d/ust the index input. Now &ou

ha+e swapped rows for columns and ha+e a different set of geometr& to use.

Page 32: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 32/73

Page 33: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 33/73

Ad9anced +amily Placement4 Adapti9e Components

Dynamo can use geometry e+tracted from the e;it en;ironment and

perform lots of different operations on that geometry. That geometry can

'e manipulated in ;arious ays using list operations. 0inally, you can ta)e

that information to place adapti;e components. In this e+ample, youll

learn ho to:

• 

#elect and use e;it geometry in Dynamo

• 

Place Adapti;e $omponents.

7. $lose any Vasari les that you ha;e open.

C45Autodes5Dynamo5Core5samples5-; Adapti9e Components4. Fpen Adapti9e Component Placement#rfa

 The contents of Adapti;e $omponent Placement.rfa.

". 0rom the Dynamo 0elp menu, go to:

$amples -; Adapti9e Components Adapti9eComponentPlacement

/. 0rom Vasari, $lic) O FpenH.

3. %a;igate to:

Page 34: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 34/73

 The nodes in Adapti;e $omponent Placement.dyn

-.  Koull notice that each of the #elect $ur;e nodes has a 'utton in

it. That 'utton can 'e used to select a cur;e inside of e;it.

Arrange your Dynamo indo so that you can see the Vasari

can;as. $lic) the rst #elect $ur;e nodes #elect Instance6

'utton and select the rst cur;e &eftmost on the preceding

imageH. Kou should see the node change to this:

A cur;e has 'eenselected

. Do the same on the other to nodes, continuing ith first ith

the middle cur;e. %o, e ha;e selected three cur;es for use in

Dynamo.

1. %o, hit un. Kou should see the folloing:

Page 35: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 35/73

Page 36: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 36/73

 The adapti;e components arrayed onto the three cur;es

 This or)space 'egins 'y ta)ing three cur;es from the $elect Instance

and the ./0 Array <n Cur9e node to get a regular list of MKNs along the

cur;e. Then, e use the %ist node to com'ine the MKNs into a nested

list. This list contains three lists of MKNs, a /D list, each one sampled

from the cur;es e selected at the 'eginning. Then, e use the

Transpose %ists node. This node returns a list of length>three lists of

MKNs. This is the result of replacing the ros ith the columns in our

original /D list. This or)space gi;es us the three MKNs that are

necessary to place the Adapti;e $omponents.

Page 37: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 37/73

Get and $et +amily InstanceParameters

• 

Cse Dynamo to select +amily Instances

• 

#ynchroni@e +amily Instance parameters across multiple instancesusing 1un

Automatically

7. $lose any Vasari les that you ha;e open

/. $lic) O FpenH.

3. %a;igate to:

C45Autodes5Dynamo5Core5samples5=; Get $et +amilyParams5

inst param mass families#r9t

 Kou should see the folloing:

 The contents of inst param mass families.r;t

4. 0rom the Dynamo elp menu, go to:$amples =; Get $et +amily Params inst param > massesdri9ing

each other

".  Kou should see the folloing in the or)space:

Page 38: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 38/73

Dynamo after opening the create pointQse9uence.dyn file

-. %ote that the to $elect +amily Instance nodes ha;e automatically

associated themsel;es ith the to family instances a pair of >

shaped 'uilding massesH. This file as sa;ed after ha;ing associatedthese nodes ith e;it geometry, so you dont ha;e to pic) the families

e;ery time you open the le.

. #et the $elect +amily Instance Parameter node to d'lH.

1. $lic) 1un. Kou should see the to instances match in height.

2. In Vasari, edit the height of the instance closer to the origin.

 The manipulator to change the height of the family instance

78. $lic) 1un, again. Kou should see the family instances update.

77. #et Dynamo to 1un Automatically#

7/. *dit the same 0amily Instances height again. Kou should see

the other instance update.

%o, you )no ho to synchroni@e 0amily Instance parameters5

Page 39: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 39/73

Basic 6ath &ith the +ormula "ode

Dynamo has many useful tools for doing math. This tutorial aims to

demonstrate ho to:

• 

Cse the 0ormula node to simplify riting mathematical e+pressions

• Generate points that follo circular or elliptical paths from a

mathematical formula.

7. $lose any Vasari files that you ha;e open

/. 0rom Vasari, $lic) O %eH O 0amily.

3. Cse !ass.rft in the $onceptual !ass folder.

4. 0rom the Dynamo 0ile !enu, go to $amples -? +ormulas

$cala2leCircle#  Kou should see the folloing in your or)space:

 The nodes in #cala'le $ircle.dyn

".  To get an idea of hat this or)space does, hit 1un#  Kou should seean arc of 

MKN points centered at the origin:

Page 40: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 40/73

 The result of running #cala'le$ircle.dyn

(ere going to edit this or)space to demonstrate a fe concepts of the

+ormula node.

-. 0irst, select and delete the #cale MKN node. Kou should see the MKNand ef 

Point node turn grey.

. &ets edit the formula in the rst 0ormula node, hich currently

contains #in+H6. $hange the formula so it says a R #in+H6 and hitenter. Kou should see a ne port on the 0ormula node called

appropriatelyH a6. Kou could;e called this ;aria'le anything. It

should loo) li)e this:

 The 0ormula node after editing the e+pression

Page 41: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 41/73

1. $onnect the output of the %um'er #lider node to the a6 input of yourfreshly

edited 0ormula node and reconnect the output of the %um'er#e9uence node

Page 42: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 42/73

to the + input of the same node. $onnect the MKN output again to the

eference Point node. Kour or)space should loo) li)e this:

 The ne configuration of the or)space after editing the first 0ormula

node.

2. it 1un. Kou should see your circle of points disappear and a

;ery narro ellipse ill replace it. Play ith the sliders to change

it.

78. &ets do the same thing to the other formula node hich currently

has $os+H6 in it. That is, lets add a multiplier to the second

0ormula node and connect a num'er slider to that. %o, your

or)space should loo) li)e this:

 The ne configuration of the or)space after editing 'oth 0ormulanodes.

77. %o, turn on un Automatically and e+periment5

Page 43: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 43/73

An ellipse created using to 0ormula nodes.

"ote4  The formula node is 'ased on the open source "Calc li'rary. It has

an ama@ing amount of features S it includes many mathematical operators,

functions, and you can e;en pass your on functions into the node5 0or a

full description of operators, functions, and more chec) out4

ht t p4 n c a lc #c o d e p le ' #c om

Page 44: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 44/73

Page 45: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 45/73

the ;alue of deflection6 ith a Get 0amily Instance Parameter Value

node.

Page 46: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 46/73

-. un Dynamo, the panels ill 'e colored in a gradient from green to red.

. A num'er things are 'eing done in the graph to get this outcome.

#tarting from the end: There is an F;erride *lement $olor in Vie

node. This node loo)s at hate;er is the acti;e ;ie6 in the e;itmodel and ill no o;erride hate;er the default ;isi'ility is of any

element ith a gi;en ;alue. Kou can simulate this manually 'y right

clic)ing on a e;it *lement and selecting F;erride Graphics in

VieOBy *lement.

Page 47: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 47/73

And pic)ing a color and pattern.

eep in mind that this is not changing anything a'out the e;it

element itself, it is ?ust changing ho this specific element is treated inthis specific ;ie. This setting ill persist in this ;ie hen Dynamo is

not present, and Dynamo ill remem'er hat panels ere changed if

they need to 'e ad?usted at a later time. ight $lic) on one of the

panels and you can inspect the setting for its color o;erride.

1. $oloration in this or)space is currently set to gi;e an e;en range of green to

red, ith a sorting algorithm that finds the ;alue of the most deformed

panel and scales all the colors 'ased on this ;alue.

2. oe;er, may'e your coloration needs to simply identify a

threshold and indicate hat panels are a'o;e and hich are 'elo. This is a 'it easier. By passing the deflection ;alues into a formulat

node ith an if6 conditional statement, you can detect hich ;alues

are greater than the accepta'le ;alue and hich ones are less than

the accepta'le ;alue. 0ind more function synta+ for the formula

node at ht t p 1 nc al c . co d e pl e x . c o m2

Page 48: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 48/73

78. By passing this formula output of 8 or 7 to the $olor ange node, the

color output ill either pass on completely red or green ;alues. As

eidi lum ould say, you are in, or you are FCT56

 Try changing the ;alues of the threshold the num'er node feeding into the

0ormula nodeH, and shifting the AGB ;alue for the $olorange node.

0or more e+amples of coloration, you can also e+periment ith the all sample in //

$olor samples. There are also a num'er of e+amples using the Analysis Visuali@ation

0rameor) to do ;ie specific coloring, 'ut that is another e+ercise.

Page 49: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 49/73

Data Interop

•  Bring Data into Dynamo from e+ternal sources li)e spreadsheets and images

• 

Dri;e any )ind of data into Dynamo and e;it processes

• 

*+port Data to other formats

 There are lots of Data out there in the orld. #ometimes it comes in the

form of num'er in spreadsheet, or colors in an image. #ometimes it is data

that is already in your BI!. This tutorial ill sho ho to mo;e any of those

)inds of data to meaningful places in your model.

7. $lose any open les. In Vasari, $lic) O FpenH.

/. Fpen: C45Autodes5Dynamo5Core5samples5>= Panel

6anipulations5DataTo+amilies#rfa

3. In Dynamo, in elp menu, 'rose to >= Panel6anipulations@DataTo+amilies

4.  Kou should see a collection of $urtain Panel families and a sun path.

If you TABOselect one of these panels, you ill see a parameter for

ad?usting the si@e of the opening:

Page 50: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 50/73

If you ad?ust this num'er 'eteen 8 and ." it ill open and close this

aperture. F;er ." it ill stay at the ." ;alue. (e ill 'e dri;ing

;arious )inds of data into this parameter.

". n 3&namo, there is a node that pulls out a list of Panel families from the model,

and 4 different data sources that we will direct to these panels. 5ome of these

data sources need to !e identified. #ind the 5unPath 3irection node and Click on

6se 5unPath from Current 7iew. -his will identif& the acti+e +iew. lso Click on

the #ile Path node and make sure that it is pointing at the data5tream.xlsx file in

the samplesPanel8anipulations folder.

-. Run 3&namo and there will !e a short pause while all the data sources are

initiali9ed and the first one passes it:s data to the Panel families. You will notice

that 'xcel has started and a spreadsheet is now open, and the Read mage #ile

node has a pre+iew image of the data it is passing.

Page 51: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 51/73

. -he first data source is /ust a num!er se;uence passing <** +alues !etween* and.*4

-his is then passed into a 5et #amil& nstance Parameter node that ad/usts the

parameter called (opening) that we inspected !efore.

Page 52: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 52/73

-he result is openings !etween the ranges of .< and .4

1. Next is an mage Reader node, which extracts the R"= +alue of a !itmap. t

then runs through a Color =rightness node which gets a +alue from *>< for

!rightness, and then a #ormula node that ad/usts the +alues to conform to our *>

.4 range we ha+e !een using. f &ou wire this into the 5et #amil& nstance

Parameter:s +alue port and re>execute the graph, &ou can now pass image data

to the panels.

Page 53: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 53/73

2. Next is an 'xcel spreadsheet reader, that extracts ta!ular data, parses the

rows to get one num!er from each ?a sine function2. Pass this to the families.

78. #inall&, we ha+e data that is internal to the model, the position of the sun.

0owe+er, there is no !uilt in wa& with Re+it to mo+e this data from one place in

the model to another. -his takes a little work, as &ou need to extract the direction

each panel is facing from the panels, then compare it to the position of the sun,

and turn this into a num!er in our *>.4 range.

Page 54: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 54/73

=ut it does the trick@ -he more the panel is pointed at the sun, the smaller the

aperture. 3rag around the sun position and run again.

0or more e+amples of mo;ing data around, Also loo) at sample /3 Data

Import and *+port. These demonstrate *+cel specific tools for reading in

data, parsing, and e+porting 'ac) out.

Page 55: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 55/73

AttractorPattern

 This e+ercise ill guide the user through a simple computational design

pro'lem using Dynamo. The user ill construct an attractor6 logic herein

the distance 'eteen points ill 'e used to dri;e a geometric ;ariation.

U &earn ho to compute relationships 'eteen MKN geometry.

U &earn ho to construct a 'asic mathematical relationship ithDynamo

%odes.

U &earn ho to create ;ariations in geometry ith distance>dri;en

;alues.U $on;ert a'stract Geometry to !odel &ines

U Visuali@e geometry in a num'er of ays

 This e+ample creates e;it elements that can 'e made in any en;ironment,

so you can or) in any e;it or Vasari conte+t.

7. $lose any Vasari files that you ha;e open

/. %a;igate to

C45Autodes5Dynamo5Core5samples5-=Attractor

3. #et to un Automatically, and hit un

Page 56: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 56/73

4. Noom to 0it (atch 3d

". Ad?ust the slider ired into the $ircle generating component.

%otice that although you are getting different si@ed circles, you

are not creating e;it geometry.

-. Ad?ust the #liders for the Attractor6 Point. %otice that there is nogeometric

representation although the (atch node registers achange

. In the Vie menu, clic) on Pre;ie Bac)ground. All geometric

entities are rendered in the can;as.

a. Toggle %a;igation 'y clic)ing cntrl>G. Noom out ith the

scroll heel, or'it ith right clic), and pan ith middle mouse

'. it cntrl>G to e+it na;igation

c. $hange the Attractor Point sliders, see MKN and $ircles in thesame ;ie.

1. %o e need to connect the pro+imity of the Attractor Point to theradius of the circles. In the loer portion of the screen, find a cluster

of nodes: MKN Distance, Di;ide, and a %um'er.

Page 57: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 57/73

2. !easure the distance 'eteen each grid point and the attractor point.

Pass the position of the Attractor point and the position of each MKN

Point grid to the MKN Distance node and then connect the resulting

distance to the circles radius.

78. The resulting Geometry is a 'it of a mess, as each circle has the

same radius as the distance of the attractor point. &ets moderate

this 'y passing the MKN Distance %ode through a Di;i;ision operator

rst

Page 58: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 58/73

77. #o far e ha;e ?ust made a'stract geometry. (e can dump out this

data into e;it !odel &ines 'y attaching the $ircle or (atch 3d

outputs to eference $ur;e and %e #)etch Plane nodes

7/. The resulting or)o results in this e;it Geometry hich is still

associated ith the graph.

a. *+periment ith the sliders to get a feel for changes in

model update ith and ithout e;it geometry.

'. If you sa;e the Dynamo file and the Vasari file, the Dynamo file

ill remem'er6 the geometry it has pre;iously created and

manipulate its parameters later, not create ne stuff.

Page 59: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 59/73

Python4 $cript a $ine Wa9e

 The aim of this tutorial is to sho you ho to:

• 

Edit and run a python script in Dynamo

• 

#ho ho to use changes in the document to update your Pythonscript#

7. $lose any Vasari files that you ha;e open

/. 0rom Vasari, $lic) O %eH O 0amily.

3. Cse !ass.rft in the $onceptual !ass folder.

4. Go to Add>ins ta' and launch Dynamo. If you already had it open,

close and re> open it to re>associate Dynamo ith the nely conceptual

mass

". 0rom the Dynamo 0ile !enu, go to $amples = Python "ode create sine

&a9e from selected points#  Kou should see the folloing in youror)space:

A python node in aor)space.

-. %o place to points using the Vasari #)etching Gallery. The

reference point 'utton is in the 'ottom right corner.

Page 60: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 60/73

.  Kou should ha;e to eference points in the Vasari ;ie:

Page 61: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 61/73

 To reference

points

1. #elect each point using the $elect Point nodes in Dynamo.

2. Press 1un. Kou should see a line and a sine a;e plotted

'eteen the to entered points. These elements ere created 'y

a Python script5

 The output of the Pythonscript

78. #et Dynamo to 1un Automatically

77. *+periment ith mo;ing the points or the straight line, notice ho the

sine a;e is updated to follo the ne position< This is 'ecause

Dynamo and the Python node can &atch specific elements and

then rerun the &orspace to eep things in sync 2ased on

your changes#

Page 62: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 62/73

7/. ight clic) on the Python node and clic) *dit to sho the script editor:

Page 63: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 63/73

 The python script editor in Dynamo

73. (e ill not dissect it in detail no, 'ut ta)e a loo) at ho the

2eginPoint and endPoint ;aria'les, get assigned

o'?ects from I". The I" and <T ports map to ;aria'les in the

script.

74. In the script editor, go to line 32 and edit the ;alue of steps.

7". $lic) 1un again. Koull notice that the sine a;e has changed.0eel free to

e+periment ith this script.

 Kou dont ha;e to use Dynamo to edit your python scripts. If you feel more

comforta'le in a different te+t editor, you can use the Python #cript 0rom

#tring node. $om'ined ith the 0ile Path node and ead file, you can

read your files from a te+t file and Dynamo ill automatically update.

$hec) out the Dynamic!o'ius e+ample under elp O #amples O Dynamic

Python *diting for an e+ample of this.

Page 64: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 64/73

An e+ample of using Python #cript 0rom #tring to edit a python script ith a diLerentte+t editor

Page 65: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 65/73

Page 66: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 66/73

 The 'onacciQecursion &esson6 node is a $ustom %ode that as

sa;ed ith the ecursion.dyn, 'ut you dont ha;e that $ustom %ode5

(e are considering sa;ing $ustom nodes in the dyn file itself, 'ut for

no, you can donload this missing 'it of functionality from the

Pac)age !anager.

3. In the pull don !enu, go to Pac)agesO#earch for a Pac)age, andlocate

fi'onacciQecursion &esson.

Install it.4. $lose Dynamo, e>start Dynamo, and open sample /7Pac)age

!anagerOecursion. This time your or)space ill loo)li)e this:

Page 67: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 67/73

". Csually a pac)age that you donload ill 'e a complete piece offunctionality.

In this case, e ill use the custom node to sho ho to contruct

ad;anced functionality. Dou'le clic) on the node and you ill no

ha;e a second ta' open hich shos the contents of the node.

Page 68: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 68/73

-. The logic of this node is incomplete. To create a fi'onnaci se9uence,

the computation needs a starting se9uence usually 8,7H hich is then

recursi;ely added. The second num'er is added to the first, then the

resulting third num'er is added to the second, and so on. In the search

'ar, enter 'onnaci6 and you ill no see your loaded custom node

appear. Place it I%#ID* of the acti;e fi'onacciecursion &esson.dyf 

or)space.

. The second num'er in the 0i'onacci se9uence 'ecomes the starting

num'er for the ne+t calculation. (e can no pass the ne+t6 input

to the start6 input of the recursi;e node. The additi;e result of 

#tart and %e+t 'ecomes the

Page 69: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 69/73

su'se9uent calculations ne+t6 input, and the esult6 of thiscalculation gets

added to a groing list of num'ers.

1. This calculation ould continue infinitely if there as not condition

specified to stop it. The &ist&ength creates a countdon, su'tracting

one from e;ery loop of the recursi;e function, until it 'ecomes @ero, athich point a conditional statement tells the loop to cease. (ire the

countdon &ist&ength into the recursi;e node. #ee ho the I06

node creates a condition herein the appended list is passed on

until the &ist&ength passes a ;alue less than @ero.

2. Kour %ode does not need to 'e sa;ed to e+periment and see if it isor)ing.

$lic) on the ecursion.dyn ta' and try it out

Page 70: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 70/73

If you ha;e the 'eha;ior you ant, you can no sa;e your node for

later use li)e this. oe;er, )eep in mind that if you #a;e As a

different name . . . you ill need 'oth the top le;el node and the

nested recursi;eH node to ha;e the same name5

Page 71: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 71/73

6any 6ore E'amples

 These tutorials ha;e only co;ered a ;ery small su'set of the sample

or)os that are a;aila'le. There are more e+amples ithin the

application, in the elpO#amples dropdon )eep in mind that many ha;e

accompanying r;t and rfa les that are 'y default )ept inc:EEAutodes)EDynamoE$oreEsamples. This ill 'e most o';ious here there

are nodes that select e;it elements or here they place specific families.H

0or e;en more e+amples, please ta)e a loo) at the hundreds of simple .dyn

les that are used in the automated testing process on Githu'.

h ttps : //gi t h u b . c o m /i ke o u g h / Dynam o/ tr e e/m as te r / t e st

 This folder is di;ided up into core, p)gs, and e;it.

 The core functionality deals ith nodes and operations that are

independent of e;it, things li)e list management, math, conditional

statements. Kou may also note that there are samples here that deal ithgeometry. These e+amples are using the Autodes) #hape !anager

geometry )ernel A#!H, and reflect de;elopment e are or)ing on to 'e

a'le to e+pand 'eyond the geometric capa'ilities of e;it. This geometry

is still pretty e+perimental, so it does not yet connect up to e;it although

you can e+portEimport ith the .sat le format.H

P)gs folder is entirely concerned ith ma)ing sure that the pac)age

manager continues to or). Kou can donload any samples here from the

pac)age manager already.

 The e;it folder houses samples that are entirely a'out operations

specific to e;it. e;it solids creation, family placements, ;ie

manipulations, etc. All of these tests in;ol;e some amount of interaction

ith the e;it document.

In theory, e should ha;e samples that reference *V*K node that is

a;aila'le in Dynamo . . . e arenWt there yet, 'ut e are or)ing on it. If

you are loo)ing for a particular node and you canWt find an sample for it in

this repo, please drop us a note. Kou need it, and e need a test to co;er

it.

What Else Can Dynamo Do The a'o;e e+amples all demonstrate many of the indi;idual capa'ilities of 

Dynamo or)ing on top of either Vasari or e;it. By com'ining these and

Page 72: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 72/73

other techni9ues, users can 'uild up comple+ and ro'ust parametric

'uilding systems. The folloing images demonstrate one such pro?ect, a

#tadium enclosure and seating 'ol. The seating 'ol is formed 'y a

recursi;e algorithm that optimi@es the ;ie for each seat

Page 73: Dynamo Visual Programming for Design 8938

7/23/2019 Dynamo Visual Programming for Design 8938

http://slidepdf.com/reader/full/dynamo-visual-programming-for-design-8938 73/73

'ased on the seat 'elo it. The enclosure creates a self>ad?usting

shading system 'ased upon the orientation of the panels relati;e to the sun.

 The structural system is a com'ination of manually defined and Dynamo

placed truss systems, le;eraging 'oth the rule 'ased and hand modelled

strengths of Dynamo and Vasari.

Where to %earn 6ore a2outDynamo

D yn a m o 2 im #org

Ffficial 'uilds, or)s in progress, forum discussions, and learningresources

g i thu 2 #c o m ie o ug h D yn amo

(atch de;elopment as it ta)esplace

g i thu 2 #c o m ie o ug h D yn a m o is su es

#u'mit 'ugs, comments, and impro;ements forDynamo