• Home
  • News
  • Revit. Parameterization 3.0. New strategies, new functions, ability to write to source element and other features

Revit. Parameterization 3.0. New strategies, new functions, ability to write to source element and other features

We present you a major update of the plugin Parametrization version 3.0!

13 en

More than 30 changes and new features await you in the new version, including the long-awaited ability to write a result to a conditionally source element! That's why we strongly recommend you to read this article, where we will try to describe all the changes and features

Formulas

The most important and extensive change of the new version is a completely rewritten algorithm of formula processing. It would be difficult to explain how the old algorithm worked and how the new one works now, so we will just tell you by one example: if you wrote a formula with the IF function and in one of the execution options (true or false) you used a parameter that is not in the element, the old algorithm could cause an error. Now the new algorithm will not try to calculate the unnecessary variant at all!

In the formula editor, you can now move text to a new line. Previously, each new line was considered an expression. Now the beginning of the expression is defined by the target parameter, and all subsequent lines are added to the expression. To make it more obvious, the formula editor now displays the number of expressions:

1 en

Also, some cases where coloring of fields in the formula editor did not work have been taken into account.

Change commiting

Previously, committing of changes in the document (transaction committing) took place at the rule level: all rule expressions were calculated and then committing was performed. Now the committing of changes takes place when writing the result to the parameter of the target element. If you find it all complicated and incomprehensible, let us explain it by example: suppose you have written a formula in a rule, which consists of two expressions. In the first expression, the conditional parameter A is changed, and in the second expression, this very parameter A is used in some function. So, earlier, the second expression took the initial value of parameter A, which was the value of the element before the rule was processed, despite the fact that the first expression changed the value of parameter A. You could bypass this point by writing the second expression in the new rule. Now, the second expression will use the value of parameter A that was set in the first expression.

In version 3.1.0.0 dated November 18, 2024, the option to specify when changes to a document will be committed has been added to the settings.

Reference parameters and special parameters ToRoom, FromRoom

Now when processing reference parameters (these are parameters that refer to another model element. For example, the value of the parameter "Level" refers to a level in the model) is attempted to set the value in a universal way: the first element with the specified name is simply searched for in the model. For example, you will process a wall and write the formula $[Base Constraint]=Level 1. In the previous version of the plugin you will get an error, but in the new version the plugin will find the first element in the model with the name "Level 1" and try to set it to the wall parameter "Base Constraint". In most cases this action will succeed.

For families in the "Windows" and "Doors" categories, you can now use special parameters ToRoom (to which room the opening leads) and FromRoom (from which room the opening leads) as reference parameters. As before, parameters from reference elements are taken through a vertical line - $[FromRoom|Name].

Special handling

In some cases it is impossible to write a universal algorithm for some action. In the new version we have added special handling of two such cases:

  • Change of the parameter "Loss method" for pipes and ducts
  • Change of the parameter "Insulation type" (Pipes and ducts) and "Lining type" (Ducts)

Design

Many small design improvements have been made throughout the plugin. Let's briefly describe:

  • Confirmation of deleting configurations or strategies is now done in a small pop-up dialog. It is no longer necessary to move the cursor to the middle of the window:

2 en

  • Added a move to a new line in the strategy description field
  • Added the ability to change the size of columns in the main window and in the formula editor

3 en

  • The function selection dialog has been redesigned - now it is more compact and functions are divided into groups:

4 en

  • Added table of contents to the instruction:

5 en

  • Added the ability to drag and drop rules to another strategy
  • Added the ability to expand the list of rules

Coloring

Strategies and rules can now be colored in! Strategies in the list are fully colorizable:

6 en

And the rules only color the first cell in the list:

7 en

Geometry

When working with strategies that check if one element hits the body of another (InRoom, IsMass, etc.), previously the check was performed only through the solid body. If the element being checked did not have a solid body, it was simply skipped. But there are a variety of elements that don't have a solid at all. For example, annotation elements or node elements. That's why we also added a check if the 2D geometry of an element falls into the solid body of another element. Moreover, if an element has no geometry at all, its hit in the solid of another element will still be checked via the insertion point.

However, it has brought new features to the plugin that you just need to understand. For example, if you run the InRoom strategy on the floor plan, this door will be considered to have entered the room:

8

This is because this door only has 2D geometry on the floor plan and all of this 2D geometry is outside the wall. So the entire 2D geometry of this door on the floor plan is completely inside the room. So it is important on which view you run such strategies and with what level of detail!

New functions

New functions have been added:

  • REPLACE – allows to replace one substring in a string with another one
  • FORMAT – converts a number to a string with the specified format
  • CV – described further

For more information on functions, be sure to see the instructions available in the formula editor!

Excel as a data source

Now you can connect a data source to the strategy in the form of a sheet from the specified Excel file!

9 en

Once you specify the data source, you can use the new CV (Cell Value) function in the formula, which will return a value from the specified cell. So in some cases you can use one strategy with multiple rules and multiple Excel file options!

Strategy filters

Strategies have gained another new feature - filters:

10 en

Now you can set just one filter for the whole strategy, and it will apply to all the rules of that strategy. But that's not all - if you specify only categories in the strategy filter and only parameters in the rules, the result will be a combined filter with these categories and parameters. And vice versa - you can specify only parameters in the strategy filter and only categories in the rules filter. If the rule has a filter with both categories and parameters, then the strategy filter will be ignored.

Processing on selected Views

Another new feature is to run parameterization on selected Views:

10 en

Works similarly to the "On current View" option, only the plugin will open each selected view and execute the currently checked strategies on it. It will be useful for cases when your strategies depend on the Views.

New strategies

New strategies have been added:

  • CurtainWallComponents – allows you to process Curtain Wall components (imposts and panels), considering the Curtain Wall as an initial element.
  • OneToMany – allows you to process elements by specifying any conditionally source elements. It is best to specify a specific element directly, for which this strategy even displays an element selection button:

12 en

If several conditional source elements are obtained by filters for the target element, they will be used all in turn, and in the end the resulting target element will be the last one found. This strategy closes the last feature of the Copy values plugin.

Writing to conditionally source element

A feature that many people have been waiting for - now the result of an expression calculation can be written to a conditionally source element! To do this, the expression must be started with one of two special functions (which, of course, are described in the instructions):

  • JOIN – collects the results of the expression calculation and then writes them as a string to the string parameter of the conditionally source element, using the specified delimiter
  • SUM – collect the results of the expression calculation (respectively, the result must be a number) and writes the obtained sum to the numeric or string parameter of the conditional source element.

For example, you create an InRoom strategy and specify, well, furniture as the target elements. Let's say you have a room with 3 chairs and 1 table.

If you write the usual expression $[Comments]=@[Name], the "Comments" parameter of this furniture will store the name of the room in which this furniture is located.

If you write the expression JOIN(@[Comments],, )=$[Name], the string "Chair, Chair, Table, Chair" will be written to the "Comments" parameter of the room. Note that you don't need to escape the comma in the second argument of the special JOIN function.

If you write the expression SUM(@[Comments])=1, then the number 4 will be written to the "Comments" parameter of the room, because the expression for each piece of furniture will return 1, and we have 4 pieces of furniture in the room.

Result window

A new specialized results window has been developed:

13 en

Now you can see in the results: how much time was spent on strategy and rule, how many matching elements were processed by strategy, rule and expression, and all the results of expression processing. For each result of expression processing, you can select elements in the model - both all of them and one by one. You can even isolate all these elements.

In general - the results of the plugin are now grouped in a more logical and clear way!

Miscellaneous

And a few other changes and features:

  • Added sorting of configurations in alphabetical order when loading the plugin
  • Added export and import of configuration
  • When importing strategies into the current non-empty configuration, a "Cancel" button has been added to the action dialog box
  • The selected processing area as well as some settings (available in the top right corner of the plugin) are now saved for each configuration
  • Removed closing the formula editor by pressing the Esc key
  • Added construction of solid body for Curtain Walls by geometry of its components (imposts and panels)
  • Added check that the element is occupied by another user
  • Added pre-selection processing when selecting the "Selected elements" processing area
  • Added correct message when selecting the processing area "On current view" if the current view does not support element selection
  • Fixed a bug where the "Dissociate" formula property was not exported
  • Fixed a bug where filters of conditionally initial elements were incorrectly processed when inserting a rule from the clipboard
  • Added possibility to write True, False values, as well as the result of logical functions calculation to parameters of "Yes/No" type

Conclusion

This update is quite extensive. And although we have tested everything, there is still the possibility of bugs or incorrect algorithms. Please do not hesitate to write to us about such errors by This email address is being protected from spambots. You need JavaScript enabled to view it. or in the support chat.

Enjoy your work with ModPlus!

Комментарии для сайта Cackle

ModPlus 2015-2024