Xinling Xu, product owner at ALLPLAN, outlines some common situations where Visual Scripting in Allplan can help and what you can do with it
No-code systems – such as Allplan’s Visual Scripting tool – are becoming increasingly popular for the wide range of possibilities they offer. But what are the benefits of Visual Scripting and why should designers use it?
Some common situations that BIM designers face can include:
- Repetitive modelling tasks, such as creating similar – but slightly different – objects over and over, or recreating objects from scratch because they require some modifications.
- Desiring to automate a process but not knowing how. Perhaps needing to modify a large number of objects at the same time or in a similar way or wishing to run a specific workflow every time data is received from an external party.
- Needing to determine if an object is compliant with building standards but wanting to accelerate and automate the process.
- Wishing to create custom objects or automatic processes, without learning a programming language or setting up a programming environment.
Visual Scripting is useful for all these scenarios and can help make these tasks easier and quicker, as well as more accurate.
Repetitive modelling: Create a custom parametric object
One common problem with modelling is that sometimes, if a designer wants to change the object just created, they have to remodel it from scratch again. For example, this can be where there are many similar pipes, but with different diameters or openings. Or perhaps a client or contractor has requested a change in design for budgetary or availability reasons. Remodelling objects from scratch is time-consuming, error prone and boring.
With Visual Scripting, however, a designer can create custom parametric objects that are easy to modify by changing the parameters. For example, creating a trench by extruding a shape along a path, in Allplan. If it changes, normally the designer could modify the object by using the Stretch Entities tool but that does not always give the result required.
Instead, with Visual Scripting, by adding four nodes (a reference point, cross-section, axis and sweep), a designer can define all parameters needed with the first three nodes and have the trench created using the sweep function. Then, if there are any changes in the future, changing the trench is as easy as double-clicking on it, modifying the reference point, axis or cross-section and confirming the changes. The trench updates automatically and there’s no need to re-model it again from scratch. This could potentially save five to 10 minutes every time that object needs to be modified – which can add up over the course of a project.
Automating processes: Use rule-based modification
Sometimes, a designer might want to modify many objects at once but doing so individually can be incredibly time-consuming. For example, perhaps when importing data, the visual representation of the architectural elements – such as columns and walls – is wrong. Rule-based modification with Visual Scripting can help overcome this quickly and easily.
Using the Change Architectural Properties function in Allplan would be the usual way to approach this issue. The problem is that a user cannot see the attribute value of elements when applying these changes, so there is a high risk of mistakes being made during this process.
There is already an example for this scenario built into the Examples Library in Allplan, under Attributes. The example script looks for pre-defined rules in a .CSV file. This file can contain information such as the material type, face style, layer, colour or others, which are the rules to be applied to the objects. After checking these are correct and running the script, Allplan will then automatically modify the existing elements based on these rules. This not only saves a lot of time; it also helps minimise any errors in the model.
Intelligent objects: Perform automatic buildability checks
Checking whether every component complies with the relevant building standards or guidelines has previously been a manual exercise – which, while very important, means it is also time-consuming and potentially error-prone. In this scenario, Visual Scripting can help by providing feedback automatically which indicates if the component complies with standards or not.
This can be achieved by using a parametric object with an attribute assigned for the standards that need to be followed. For example, a parametric bridge could be created with an attribute that specified a certain angle range for the bridge axes. Then, if the horizontal or vertical alignment of the bridge was repositioned, this attribute could highlight when the bridge is no longer compliant. The colour of the bridge could also change to provide a visual cue that the standards are not being met. Buildability is improved and the checks are quick and accurate.
Customised scripts: No programming knowledge required
The Python programming language is what Allplan uses for Visual Scripting and other automation functions. Allplan even includes a library of PythonParts, which are essentially intelligent, pre-designed parametric objects. They can be modified just like a custom parametric object but without the need to model them from scratch.
However, a designer may require an object that isn’t already in the library or may want to create a script for running reports or other processes that are unique to their workflow.
Using the Python language to achieve these results is entirely possible but it requires a deep understanding of programming, as well as the Allplan Python API. It is much more flexible and powerful, but this option is aimed more at developers rather than architects and engineers. Visual Scripting is one way to provide these powerful tools within Allplan, without the need for any programming knowledge. To learn more about how Visual Scripting works, take a look at our previous Visual Scripting blog post, which also has a video of the process.
The power of Visual Scripting in Allplan
Visual Scripting has been designed to be as user-friendly as possible, and to provide architects and engineers with the tools they need to optimise their daily work. With the help of Visual Scripting, they can leverage the benefits of automation to create efficiencies and improve quality by removing manual tasks.
*Please note: This is a commercial profile