• Home
  • Training Books
  • Subscribe to Our Email Newsletter
  • About
    • Contributors
    • Feedback
    • Contact
    • Privacy policy
    • Cookie Policy

CADnotes

CAD Tutorials and Best Practices for professionals and students

  • Featured
  • AutoCAD
    • AutoLISP
  • Revit
    • Revit Architecture Basic
    • Revit MEP Basic Tutorial
  • Inventor
  • MicroStation
    • MicroStation Basic Tutorial
  • CADnotes on YouTube
You are here: Home / Revit / Dynamo / Dynamo tutorial: Working with Parameters

Dynamo tutorial: Working with Parameters

March 14, 2019 by Edwin Prakoso Leave a Comment

In this Article...

  • Getting the Parameter’s Name
  • Change the Values to Upper Case
  • Put Back the Modifed Names To Revit Views

We created a simple Dynamo script in our tutorial series. We learned how to place an element using Dynamo. Another popular usage of Dynamo is to modify the parameter’s value. In this tutorial, we learn how to adjust all Views’ name to all caps.

Open a sample Revit file or your Revit project. A sample project has a mixed case of view names. We are going to change all view names to all caps.

With the Revit project file opens, open Dynamo. Create a new file.

Getting the Parameter’s Name

What we need to do first is to select all views. In Dynamo library, under Revit category, Selection sub category, click All Elements of Category.

The node requires category as the input. Place your mouse pointer on the empty area in your workspace, click your right mouse button. Type categories on the search field.

Select the Categories node from the search result. Connect the nodes. In the Categories node, select Views for input. Notice that our Dynamo script selects the views.

We selected the views, now we need to get the view names. Revit saves the view names in a parameter. The parameter name is View Name. Let’s grab this value.

Right click in an empty space to search a node. Type getparameter in the search field.

Select GetParameterValueByName from the search result. Use the elements output for the input.

Add a string node and type View Name for the Parameter Name input. Remember, View Name is the the parameter name that we want to take. The parameter name is case sensitive. Type the name exactly as it is.

Now we have all the view names. The node color is now orange, it means there is a warning. We can ignore this warning now. The warning shows because some views don’t have a view name.

Change the Values to Upper Case

Now add ToUpper node. This node converts the values to all caps.

We grab the views name, we convert it to all caps, now what we need to do is to set the new values to the views.

Put Back the Modifed Names To Revit Views

Add node SetParameterByName. We use Get to get the value and Set to change the value.

Most of the inputs for this node is the same as inputs that we use for GetParameterValueByName node. Except for the values.

  1. The element that we are going to change is the views.
  2. The parameter name is View Name.
  3. For value, we use the value after we process it with ToUpper node.

Revit shows this warning when you complete the script. Unless you checked the Do not show me this message again before. Click Yes.

Check the Revit Project Browser. All the view names now are all caps!

This is another simple script that you can do in less than 5 minutes but very useful. Dynamo doesn’t have to be complicated. It can be very simple, but gives significant result.

About Edwin Prakoso

I work as a Solution Consultant in Datech Solutions, Tech Data Indonesia. I've been using AutoCAD since R14 and Revit since Revit Building 9. I occasionally write for AUGIWorld magazine and I am also active in Autodesk discussion forum. I'm a member of Autodesk Expert Elite, an appreciation for individuals who give contributions to the Autodesk community.
Connect with me on twitter or LinkedIn.

Filed Under: Dynamo, Others

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
Join Our Free Email Newsletter
  Thank you for Signing Up
Please correct the marked field(s) below.
1,true,6,Contact Email,2 1,false,1,First Name,2 1,false,1,Last Name,2

Featured

Work Better with AutoCAD | Challenge 3: Reusable content

In this week Work Better with AutoCAD challenge, you will create reusable content: AutoCAD Block. You have chance to win an e-book just to participate in this challenge. Or win a grand prize after all challenges are given!

Recent Articles

  • Model-Based Progress Tracking in Autodesk Build
  • Understanding Surface and Cut Patterns in Revit
  • Revit 2024.1 Update is Released

Advertisement

New on CADnotes

  • Model-Based Progress Tracking in Autodesk Build
  • Understanding Surface and Cut Patterns in Revit
  • Revit 2024.1 Update is Released
  • What’s New in Revit 2024: Bending Detail
  • What’s New in Revit 2024: The Dark Theme

Meet the Authors

avatar for
avatar for
avatar for
avatar for
avatar for
avatar for

Get Connected

CADnotes on FacebookCADnotes on InstagramCADnotes on TwitterCADnotes on YouTube

© 2009 – 2023 CADnotes · Feedback · Privacy Policy · Become an affiliate

wpDiscuz