Element.GetParameterValueByName(Room, "Phase")

Hello,
Does anyone know why I am getting the name of the New Construction phase but the element of a user-created one?

I think Phase returns an integer, from there you need to retrieve the name… kindda like worksets

See this Post… might help

Thank Vijay,
It looks like they are having the same problem but it does not answer the question as to why it is happening. My New Construction phase (a prebuilt one) is also element 0. My guess is that the New Construction phase is the first element added to a file as everything needs a phase. I know it’s strange to see a single-digit element ID but they do start at 0. Most user-drawn elements start at a higher number because things like level one, views, properties, parameters and other built-in elements take up the lower-end numbers.

@Daniel_Hurtubise, I actually could care less about the name. I want the phase order. I am sure I can figure out a workaround but still it’s strange that I am giving two different value types (element and string) when requesting the same thing.

Strange. What version of Revit are you in and are all your rooms placed? Does Object.Type confirm that they are in fact strings?

A quick workaround for the moment.

Nick, All rooms are placed, and yes they are strings.

image

Revit:
19.2.20.24
20190808_0900(x64)
2019.2.2

Dynamo Core: 2.0.3.8810
Dynamo Revit: 2.0.3.8811

Do you see similar things with other projects or Revit versions?

Not sure what your comfort with Python is, but could you try getting the phase through the API? I’m curious as to whether this is something actually going on in the API or just a bug. If you have Revit Lookup that might also be a good place to double check.