0% found this document useful (0 votes)
755 views5 pages

Dynamo For Revit Basics1

dynamo

Uploaded by

vico1982
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
755 views5 pages

Dynamo For Revit Basics1

dynamo

Uploaded by

vico1982
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

TECHNICAL WHITEPAPER

Dynamo for Revit Basics – Part 2 of 4:


Working with Text (Strings)

When starting with Autodesk® Dynamo, it is hard to determine where to begin.


In the first part of this series, we discussed the basics of Dynamo and how to do Table of Contents
some basic interaction with the software. Now we will look at one of the most ■■ Basic String Input
commonly used variables, which is a String (otherwise known as Text). Strings
■■ Concatenation
control a large amount of text parameters and are a key component when dealing
with data collaboration outside of the Autodesk® Revit® software. Knowing how ■■ Concatenate by Separator
to manipulate and organize strings is very important. Let’s open up the Dynamo ■■ Concatenate by List & Separator
add-in within Revit and see how to make strings work for us! ■■ Concatenate by Code Block
■■ String Insertion
Basic String Input ■■ String Length
There are 2 basic methods of inputting string values. The first of which is using ■■ String Occurrence Count
the ‘String’ node. This node requires case sensitive text input. The second ■■ String Case Change
method is via a Code Block. This node requires you to place the intended text in
quotation marks; this is how Dynamo reads variables as text.

Code blocks tend to be faster because it only requires you to double-click on the screen to place a code block.

[email protected] 800.356.9050 www.imaginit.com


Dynamo for Revit Basics – Part 2 of 4: Working with Text (Strings) 2

Concatenation
Concatenation is a method used to combine variables such as text. The String.Concat node combines separate string values into
one continuous string. Think of it as a simple addition formula. Please note: Spaces are considered to be characters. If you require
spaces, please ensure that it is added onto the beginning or end of your string.

Concatenate by Separator
Sometimes it is beneficial to use a standard separator for separating strings. In the examples on the right, a “_” is being used to
separate each string. This can prove to be useful when combining Room Numbers with Room Names for use in an Excel schedule
or Room data sheet.

[email protected] 800.356.9050 www.imaginit.com


Dynamo for Revit Basics – Part 2 of 4: Working with Text (Strings) 3

Concatenate by List & Separator


Concatenating a few pieces of text may seem a little rudimentary. However with the method below, you can concatenate entire
lists of strings in sentences. This allows you to add a separator to entire lists of strings and combine them all into one continuous
piece of text.

Concatenate by Code Block


As mentioned previously, concatenation is much like addition. String concatenation can be done with a code block by using the
“+” symbol for addition. Ensure that all intended characters are enclosed via quotation marks.

[email protected] 800.356.9050 www.imaginit.com


Dynamo for Revit Basics – Part 2 of 4: Working with Text (Strings) 4

String Insertion
Sometimes strings need to be inserted at certain points within another string. This node allows the user to insert any string at a
specific location. This insertion of this text starts at 0 (zero). In the example on the right, the String “n’t” is added to the position
where the 3rd character would normally exist. This position is the number 2 (0,1,2) in Dynamo.

String Length
String length is used to extract the number of characters within a string. This can be beneficial when telling Dynamo to only use
Strings that have a max of 3 characters. This is a great filtering tool for wall and door schedules.

[email protected] 800.356.9050 www.imaginit.com


Dynamo for Revit Basics – Part 2 of 4: Working with Text (Strings) 5

String Occurrence Count


The tool to the right can be used to count the number of specific strings within a large string collection. This is more of an adminis-
trative tool to identify over-use and repitition. The boolean is used if the node should be case sensitive.

String Case Change


The tool to the right is a great tool for changing text from a random case to either Upper or Lower case. The boolean attached to
the node will switch it to upper case when True or lower when False.

There are many other methods for editing strings within Dynamo, which are fairly self-explanatory. The ones listed above are the
most heavily used and most practical for project use. Use this as a guide for editing and manipulating strings when populating
scripts. This will prove useful in the next installment of Dynamo for Revit Basics, where we learn how to Extract and Write data to
and from Excel. Stay tuned for a more in-depth look into the world of Dynamo!

About IMAGINiT Technologies


IMAGINiT Technologies, a Rand Worldwide Company, is a leading provider of enterprise solutions to the
engineering community, including the building, manufacturing, civil and mapping industries. With over 25
years of experience, and over 40 offices throughout North America, we provide the expertise, training
and support to help companies realize the full power of design technology, maximize ROI and gain
competitive advantage.

IMAGINiT is a leading provider of Autodesk software solutions and the largest North American Autodesk
Authorized Training Center (ATC) partner. All of our locations are supported by a vast pool of engineering
resources focused on developing real-life business solutions for their local clients.

[email protected] 800.356.9050 www.imaginit.com

You might also like