Incremental Addition

Hi,
Can anyone explain why I am getting ‘null’ results in the Incremental Addition block? I don’t entirely understand how it should be working to be honest. I just know i want to see numbers, not ‘null’ values.

ps. this file works perfectly on my other computer running 2016 Revit and down-versioned packages of dynamo…
i’m getting these errors on Revit 2017. I have tried downgrading the updates in the packages but i can’t remember the exact combination to copy that which is on my other computer.

thanks
Samuel

It doesn’t work for me either.

Are you after something like that?

1 Like

I don’t have this particular node but it looks like it could be a Levels issue because you are dealing with sublists :thinking: What are the contents of the node?

@salvatoredragotta Did you try yours with lacing set to longest? I wouldn’t expect that to be an issue given what the node’s name implies about its function, but I wonder since you did get one result.

In any case, here is a node solution if what you’re after is what Salvo has shown with Python :slight_smile:

edit: I just realized our results are slightly different :sweat_smile: @salvatoredragotta do you mind sharing your Python script? I’m wondering why the different results

2 Likes

This is my code:

data=IN[0]
Incremental=[]
i=0
while i <len(data)-1:
   result=(data[i]+data[i+1])
   Incremental.append(result)
   i +=1
      
OUT=Incremental

or if you want to increment your way:

data=IN[0]
Incremental=[]
Incremental.append(data[0])
i=0
while i <len(data)-1:
   result=(Incremental[i]+data[i+1])
   Incremental.append(result)
   i +=1
      
OUT=Incremental

Lacing doesn’t produce the correct result

4 Likes

Thanks both of salvatoredragotta & awilliams. I need the block to incrementally add 900, then 450, then 450 again, and cycle until a max is reached

Is any of the solutions above solving your problem?

nope, sorry. i tried. I wouldn’t know how to edit your code to increment and add at 900,450,450

Could you sketch what your result should be?

something like this

Something like this?

image

1 Like

@awilliams or my code above are already getting those values

image

data=IN[0]
Incremental=[]
Incremental.append(data[0])
i=0
while i <len(data)-1:
   result=(Incremental[i]+data[i+1])
   Incremental.append(result)
   i +=1
      
OUT=Incremental
4 Likes

that looks like it would work. i’ll put it in. thanks Ewan_Opie!
in anycase sounds like reanimation block ‘incremental addition’ is broken. would be good to fix this.

thanks salvatodragotta too!

image

mine’s not incrementing

that Code Block just passes the data through:

1 Like

The problem here is that the input was a list of list of numbers instead of just a list of numbers. Either take out the nested list or in the python code, change the data = IN[0] to data=IN[0][0]

1 Like

yes this worked. thanks.

now the node is working :confounded:
(i just shutdown dynamo and revit completely and restarted)
but of course something else is broken…no errors, but nothing is happening at the end of the ‘run’. calcs seem to be happening correctly for the most part, at the end of the line it’s meant to create curtain grids at the spacing i’ve determined (900,450,450) for the entier length of ‘selected wall’. however no curtain grids created.

the most frustrating thing is last night this all worked in revit 2016 on my other computer. it was generating grids and mullions based on the input i gave it…

ok so, after going out for a smoke (this is the key), the only way i managed to get the whole ‘thing’ (what’s a dynamo set of nodes called?) to work is by removing the profile from my curtain walls, run the script, then reapply the profile…, for each wall…i’m sure there’s better ways to do this. once im’ not considered a new user i’ll upload the dyn file

You can always upload it to a file sharing service and post the link here! It sounds as if though the workflow you are describing with the curtain walls and the profiles may be a separate topic from the incremental addition node, so a new post might be best :slight_smile: