Tool

Write the codes

Technical name: wbs_scrivi

Data › WBS

Writes the model

Creates the missing WBS parameters and writes the codes into the elements, only the changed values, in a single operation that one Ctrl+Z undoes.

What it does

Writes the WBS codes into the model's elements with the linked configuration (or with one passed by your AI, which is not saved), like the "Write to model..." button of the "WBS" window.

  • Parameters. Creates the missing parameters and binds them to the included categories. A parameter that already exists in the project is extended to the categories it lacks. New parameters take their definition from the shared parameter file named in the configuration, if it holds one with that name (the file is only read); otherwise BIMit creates them in its own shared parameter file, with the same GUID for the same name in every project. Revit's shared parameter file setting is restored at the end.
  • Values. Writes the complete code and the value of each parameter, only where they changed. Incomplete elements are not written; elements to review are, unless the configuration says otherwise. A type parameter is written only if all the elements of that type give the same value.
  • Groups. For elements inside groups, the WBS instance parameters are set so that they can vary between the group instances.

It returns how many values it wrote, how many were already up to date, the counts by state, the messages about the parameters and the elements not written with the reason (up to 100).

How it works

  1. Your AI calls the tool, usually after checking the Code preview; it can limit it to some categories or to the elements of a view.
  2. BIMit checks the configuration, computes the codes and in Revit creates the parameters and writes the values in a single operation "BIMit: write WBS".
  3. You get the summary: values written, already up to date, incomplete ones not written, elements not written and why.

Example requests

  • "Write the WBS codes into the model."
  • "Write the WBS for doors and windows only."
  • "Update the WBS codes of the elements in the Ground Floor view."

What changes and how to undo

The project parameters change (created or extended to new categories, option to vary between groups), and so do the values of the WBS parameters in the elements and types. If BIMit's shared parameter file does not yet hold a parameter, it is added.

Everything happens in a single operation: one Ctrl+Z in Revit undoes parameters and values. If Revit reports an error while creating the parameters or writing the values, everything is rolled back automatically and the reason is in the answer.

Limits

  • The model must be editable: not read-only, and with no other operation in progress in Revit.
  • Not written: elements in use by another user in a workshared model, read-only or non-text parameters, and group members when the parameter cannot vary between the group instances.
  • If a parameter with the same name already exists but as a type parameter instead of an instance one (or the other way round), or is not a text parameter, nothing is written and the answer says so.
  • If the configuration has errors, the tool lists them and does not write.

Every change to the model can be undone with Ctrl+Z in Revit; team actions ask for confirmation in Revit.

Parameters

ParameterMeaning
configurazioneA configuration to use instead of the linked one (it is not saved).
categorieOnly these categories (internal names such as OST_Walls).
vistaOnly the elements of this view (name, or "attiva" for the active view).
vista_idOr the view id.

Related tools

All tools