DynamoDS / DynamoRevit

Dynamo Libraries for Revit
https://dynamobim.org
335 stars 187 forks source link

Calling Revit.Element functions from DS functions fails for a list of inputs #1604

Open dimven opened 7 years ago

dimven commented 7 years ago

Dynamo version

1.21

Revit version

2016/2017

Operating system

Windows 7

What did you do?

I made a very basic DS function with the following syntax:

def NewPlanByLevelType(lvl, type){
return = type? FloorPlanView.ByLevel(lvl) :
               CeilingPlanView.ByLevel(lvl);
};

and fed it a list of levels and bool values

What did you expect to see?

A list of newly created views

What did you see instead?

revit_2017-03-06_16-26-44

The watch node is empty, even tho the node reports it's returning 132 elements and I only get the last view added to the revit model. It looks like the output element gets overwritten every time you call the DS function. If you call the function only once, everything behaves as expected.

@ke-yu

Randy-Ma commented 7 years ago

@ke-yu I doubt this is related to the element binding issue that you have fixed some time back. It works perfectly in the graph as illustrated: image