Write data to a shared parameter


#1

Hi everyone,

Following up my discussion about list group by value :
http://dynamobim.org/forums/topic/list-group-by-value/

I am now looking to write theses values into a shared parameter.
The problem is :
I have a list of 5 values
I have 31 rooms.

My first list (corner up right) is :
the number of an apartment (a shared parameter)
the total surface of all the rooms given this common number of the apartement.

The second list (corner down right) is :
the number of an appartement (same shared parameter)
the surface of the room
the Id (guess I’ll have to sort it by to write the right value ?)
the shared parameter (total surface of the appartement)

Now, i’m trying to do :
if any room in the project has the same value of List 1 [0] “Apartement number” then you write the value [1] (previously calculated value) into the [3] (List 2)

I’m doing a == with cross product to get this true/false checking…Am i getting somewhere with this ? But i don’t know how to sort after that…

I checked that discussion but it’s for one value > one calculated value…
http://dynamobim.org/forums/topic/write-calculated-value-to-a-shared-parameter/

I must say i’m kinda lost here…

 


#2
I'm still stuck with this problem...
But i think i'm getting closer to the list i need (I hope so!)
here's perhaps something simpler than the true/false test I was doing earlier in the previous post.

I'm thinking of Replace at index ?

if [0] in List 1 matches [0] in List 2, then replace [2] in List 2 by [1] in list 1.
But when I do a replace, the [2] become only one value.



#3

Hello Thomas,

It’s a bit hard to follow your screen-shot examples. You might get faster responses if you upload a simplified version of your work-flow.

For your problem, you could try using the “Dictionary.ByKeysValues” node from spring nodes:


#4

Thank you Dimitar !
I’ll keep that in mind for the next posts :slight_smile:

 

Thanks for the solution ! It is exactly what i wanted to do !