Number of People

PLease help me, I need a Python Code that retreive or write the number of people for a given space. i can not do it with the set.parametre.value.byname Node, because i am using a frensh version of revit and the properties "number of people " cannot be recognized

Noone is there ?

I would like someone to do my job, too.

Hello ORGANON,

You are right, but you know, I tried hard to do this with the existance node of dynamo, but it always fail. and the problem is that i do now nothing in PYTHON

Hi Hamdi

I am not sure that the Frensh version should have another API, then the Native Revit. If the API is the same, then you might find the solution in this script.

The issue by Number of People is a read only, because the value are calculatede by Revit. If you set the value to be specified, then you will be able to write the value into the paramter.

Number of people per space

 

Good luck with the task

 

Best regards Palle

Thank you Palle,

the problem is that with the frensh version , i can not get the correct parametre name to set. (it is always says : there is no parametre with this name), that it why i need a python code

 

 

 

Hi,

Pick correct names from element.Parameters:

ElementParameters -> new code block: “x[NumberOfParameter];” for example “x[10];” -> setParameter node.

Im going to answer in French if you guys dont mind :slight_smile:

 

Pour entrer une valeure le parametre “Nombre de Personnes” doit exister et il dit aussi avoir exactement la meme orthographe (et type de valeur).

Thank you all,

Daniel, that is the problem, in the english version, we can set thi parametre, but in the frensh one, this parametre does not excite. I used the element.parametre node, and there is no such parametre, the only one is “Personnes”, and when i try to set it, it said the paremtre cannot be number !!! i look in the revitAPI (http://revitapisearch.com/), and this parametre does exist : (public double NumberofPeople { get; set; }) but since I am very bad in Python (more bad then in english :slight_smile: ) so I do not know what to do.

Hi Hamdi

The princip of Dynamo, is that it works trough the API of the application, so if the function is not availerble trough the API, then you can´t do it.

My suggestion for you would be to have a look inside Revit and see what name there is used in the interface.

parametername