Copying Phased Demolished Value into a new parameter field

Hi there,

I have been working on this graph for a few weeks now and i cannot seem to understand what is happening. I believe it is a list levels thing, but no matter what i do i cant get it to work.

So my goal is to copy the values of each objects; phase created, and phase demolished. To make sure that it will work for any type of phasing design i have created a phase before existing, after existing, and after new construction.
image

I have managed to get the phase created working perfectly. see below.

but i cannot for the life of me, get the phase demolished sorted.

I hope this is readable, but basically, it is taking the phases of the project, then getting the element name of those phases. It seems that existing and new construction have ID 0 and 1 and then the rest of the phases have more ‘normal ID’ numbers. I am using the list.replace to find those elements, and replace them for the Name of the element. However, for some reason one of the phases wont replace.
Phase 2 replaces on the 3rd list but no where else, 773713 is phase 2.

what am i missing?!

Many thanks for any help you can give me :slight_smile:


this image might make that first image a bit clearer

@AmybeckenhamM8V47 ,

i can`t follow you… Phases is driven by different options. These are not just like Parameters…

Do want to set Parameters on a other phase?

or do you want to Phase from elements as a string stored in a parameter ?

KR

Andreas

Hi! thank you for your quick response. Sorry that it is not clear.

I want to copy the parameter value into a new parameter. see below.
image

@AmybeckenhamM8V47 ,

thats a simple get and set script!

collect your elements f.e by category

get the parameter values

and set it to the parameters…

KR

Andreas

yes i know, but please re-read my issue, it is more to do with how to get the NAME of the element and replace it in the list. but it is only finding it in one list

Phase is another Revit Eelement with its own Id.
You have to set the Id here.
Revit will show the Name of the Phase

@AmybeckenhamM8V47 ,

so i did this way


KR
Andreas

Hi Marcel, thank you for joining the discussion. I see, so thats why when i get the IDs and try to match them it doesnt work.

I dont understand though, why it works on the Created phase, and then also works on one version of phase 2 in the demolished phase?

So i totally get what you are saying Andreas, however, my situation is this. I can get the element.name but only for the new phases, see below:

@AmybeckenhamM8V47 ,

i got you…

the other phases are “not there” hmmm… :confused:

Try this:


thank you!!! that worked perfectly!!!

1 Like