4 practical examples where Visual Scripting helps best

March 25, 2022

No-code systems – such as Allplan’s Visual Scripting tool – are becoming increasingly popular for the wide range of possibilities they offer. However, for anyone who has a design workflow they are used to and efficient with, these tools can seem like they are an optional extra. So, what is the point of Visual Scripting and why should you use it? Below, Xinling Xu, Product Owner at ALLPLAN, outlines some common situations where Visual Scripting can help and what you can do with it.


Situations Where Visual Scripting is Useful

Have you ever had one of the following situations:

  1. You had a repetitive task, such as creating similar – but slightly different – objects over and over, or were recreating objects from scratch because they require some modifications.
  2. You wanted to automate a process but didn’t know how. Perhaps you wanted to modify a large number of objects at the same time or in a similar way, or you wanted to run a specific workflow every time you receive data from an external party.
  3. You needed to determine if an object is compliant with building standards but wanted to accelerate and automate the process.
  4. You wanted to create custom objects or automatic processes, but without the hassle of 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.

1_-_Parametric_Object© ALLPLAN


How Visual Scripting Helps Solve Common Problems

Let’s take a closer look at how Visual Scripting can help in each of these situations.

1. Repetitive Modeling: Create a Custom Parametric Object

One common problem with modeling is that sometimes, if you want to change the object you have just created, you have to re-model it from scratch again. For example, this can be where there are many similar pipes, but with different diameters or openings. Or perhaps the client or contractor has requested a change in the design for budgetary or availability reasons. Re-modeling objects from scratch is time consuming, error prone, and boring.

With Visual Scripting, however, you can create custom parametric objects that are easy to modify by changing the parameters. For example, you can create a trench by extruding a shape along a path. If it changes, normally you could modify the object by using the Stretch Entities tool, but that does not always give the result you want.

Instead, with Visual Scripting, by adding four nodes (a reference point, cross-section, axis, and sweep), you 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 ten minutes every time that object needs to be modified – which can add up over the course of a project.

2. Automate Processes: Use Rule-Based Modification

Sometimes, you want to modify many objects at once, but doing so individually is incredibly time consuming. For example, perhaps when you import IFC 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.

2_-_Rule_Based_Modification© ALLPLAN

Using the Change Architectural Properties function would be the usual way to approach this issue. The problem is that you 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 issue 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, color, 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 minimize any errors in the model.

3. 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, error prone, and boring. In this scenario, Visual Scripting can help by providing feedback automatically which indicates if the component complies with standards or not.

3_-_Enhanced_Buildability© ALLPLAN

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 color 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.

4. Customized 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, you may require an object that isn’t already in the library, or you may want to create a script for running reports or other processes that are unique to your 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

Visual Scripting has been designed to be as user-friendly as possible, and to provide architects and engineers with the tools they need to optimize 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. Download a free, 30-day trial of Allplan to see the benefits of Visual Scripting for yourself.

Learn more and watch the presentation now.

XinglingXu

Xinling Xu,
Product Owner

 








 

Category: