GetValues Deprecated

So I need help in locating the correct node now that the GetValues node has been deprecated.

I have it retrieving a value from an excel worksheet to plug into a Revit parameter. Any help would be greatly appreciated.

Here is the entire script. This issue is at the end of it all.

Hi @STEVE_COBURN,

This node no longer exists in Dynamo 2.0.
Try to connect directly List.DropLastItem node to the input “value” of SetParameterByName node.

So the value input (var) is not pulling the value from the list node (return value). It runs but nothing happens. No values are re-entered into Revit.

Can you show the previews under List.LastItem, List.DropLastItem, List.SortBykey and SetParameterByName nodes ?

Alban,

I just noticed that my category was not set correctly in that last section. It was under ‘areas’ and not ‘assemblies’. I’m having problems with Dynamo keeping those categories static. It wants to change everytime I open up the workspace. It’s usually different every time as well, lol!!!

Thanks for your help.

Those change between Revit versions - best to call them by another method instead.

Are you saying the categories change between versions? I find that hard to believe. Besides that I even updated my work in 2019 and it still loses track of the category. It’s not always different either, sometimes it will be right and sometimes it won’t be.

Yes. Categories are added as required for the development team to add new features, that’s pretty clear. You can run this python code to pull the categories in the active document.

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager

clr.AddReference("RevitAPI")
import Autodesk

clr.AddReference("RevitNodes")
import Revit
from Autodesk.Revit.DB import *
clr.ImportExtensions(Revit.Elements)

import System

uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application

try:
	errorReport = None
	doc = DocumentManager.Instance.CurrentDBDocument
except:
	import traceback
	errorReport = traceback.format_exc()

userCategories = doc.Settings.Categories
names = []
for i in userCategories:
	names.append(i.Name)
	
OUT = names

In my Revit builds I get the following category counts from a clean imperial template (choose none):

2016: 267 categories.
2017: 278 categories.
2018: 292 categories.
2019: 302 categories.

Warnings also change year to year (I believe there are now about 1050 possible warnings, up about 100 in the last 3 years or so). Both of these are just a function of software development. If those were left static you’d get no features in a release, and no one would be happy with that.

For why the values change in Dynamo, my understanding is that the dropdown stores an index value of the category in the .dyn. Values which mismatch may not pull the correct category, and since the changes happen every year…

Matching model types and versions should align with the graph, assuming you saved the graph between the models. If you do see matching Revit builds and dynamo versions causing a mismatch, post the results including the .dyn so we can try and get to the bottom of this issue. If you’d prefer to just avoid the issue entirely, utilize the Category.ByName node. Just make sure you spell the name right, or you’ll get an equally frustrating error.

1 Like