Read the value of the user parameter for the current element.

Call:

int ires = ac_request("elem_user_property","get", string sparname);


Here:

svarname is the name of the parameter to get the value from.

ires - 0 if it was considered successful.

The result is obtained by calling the ac_getnumvalue() or ac_getstrvalue() function;

Example.

Read the value of the logical parameter "Useful area of ​​the building" from the current element.


string sUP = "Useful building area";
int ires = ac_request("elem_user_property","get",sUP);
if(ires==0)
{
   istrue = ac_getnumvalue();
   if(istrue==1)
   {
      cout << "This zone refers to the usable area of ​​the building";
   }
}


If the project has user-defined variables with the same names in different groups, for example, the "Opening width" variables are created in the "Window Variables" group and in the "Door Variables" group, then in order to access the "Opening Width" variable in the "Window Variables" group, you need to specify the group in the variable name through a double slash:

sUP = "Window Variables\\Opening Width";