Tool

Set parameters

Technical name: imposta_parametri

Data › Parameters

Writes the model

Writes values into the parameters of elements or types in a single Revit operation, and reports which values it could not write and why.

What it does

Writes values into the parameters of elements or types in the model. Each value gives the id of the element (or type), the parameter name and the value to write; one call can carry many values, across different elements and parameters.

The value is always given as text and BIMit converts it according to the parameter's type:

  • text: written as is; an empty value clears the text;
  • numbers with units (lengths, areas, angles…): in project units, the unit may be written too, for example "2.50 m" or "250";
  • integers and yes/no: an integer, or true/false, sì/no, yes/no, 1/0;
  • references to an element (for example a material or a level): the element's id or its name.

The parameter is looked up by name, as Revit shows it in the properties; for a Revit built-in parameter the internal name can be used, for example BIP:ALL_MODEL_INSTANCE_COMMENTS. For type parameters, give the id of the type.

How it works

  1. Your AI prepares the values to write, usually after reading elements and parameters with the tools of the Read (Leggi) package.
  2. BIMit writes all the values in a single Revit operation. Values it cannot write are skipped with the reason: element does not exist, element in use by another user, parameter not found, read-only parameter, value not valid or refused by Revit.
  3. If Revit refuses the operation as a whole, the model stays as it was and your AI receives Revit's errors.
  4. Your AI tells you how many values were written and which were not, with the reason.

Example requests

  • "Write 'Checked' in the Comments parameter of all walls on Level 1."
  • "Set the Assembly Code of the door types as in the table I gave you."
  • "Set the Top Offset of the selected walls to 2.70 m."

What changes and how to undo

The values of the given parameters change, and nothing else: no elements created or deleted, no file written. A written value replaces the one that was there. All the values of one call are in a single Revit operation: one Ctrl+Z in Revit undoes them all.

Limits

  • Needs the AI level "Write" (the default), which you choose with the "Level" button on the BIMit tab.
  • The model must not be read-only and no command may be in progress in Revit.
  • In workshared models, elements in use by another user are skipped.
  • If several parameters of the element have the same name, the first one Revit finds is written: in that case use the internal BIP: name or a unique name.
  • A reference by name uses the first element or type in the model with that name; if there are duplicates, use the id.
  • Every change to the model can be undone with Ctrl+Z in Revit; team actions ask for confirmation in Revit.

Parameters

ParameterMeaning
valoriThe values to write (required): a list of entries with id, parametro and valore.
valori[].idId of the element or type (required).
valori[].parametroParameter name, or BIP:NAME for a Revit built-in parameter (required).
valori[].valoreThe value, as text; empty to clear a text (required).

Related tools

All tools