TLDR
- The project file (avsprj) was introduced for script creator.
- Use new "Create Object" button to generate object.
- Copy nodes between different scripts.
- Quick Insert won't be cropped by the boundary of the canvas.
- Stop button.
- New visual states for nodes (require registry key).
avsprj Project File
One of the main changes in Allplan 2023 Visual Scripting is the new avsprj format for developing a PythonPart script with VS editor. With that new file format, we want to make it clear for a user:
- avsprj is the format for editing in VS editor used by the VS script developer. The Allplan library won't be able to start avsprj files.
- pyp is the format for starting a PythonPart script in Allplan used by an end-user. The PythonPart object in Allplan is associated with the pyp file, not the avsprj file.
Some reasons and benefits behind that changes are:
- VS Editor can't open coded pyp files, but the script it creates is also a pyp file. A dedicated format for VS editor will reduce the confusion between VS pyp and coded pyp files.
- As we continuously introduce new features to the VS editor, some information is unnecessary for running a script. Putting more of them into the pyp file creates unnecessary overhead at runtime.
- In Allplan 2023 and beyond, VS editor won't support opening any new versions of the VS pyp file. Therefore, it can provide some protection to the original graph. Due to the backward compatibility, the VS editor can still open the current version of the VS pyp (v1.4.1) file, but not any newer version.
Create Objects in Allplan
The second main change in Allplan 2023 Visual Scripting is how to create objects in Allplan from Visual Scripting.
In all previous versions, a user must close the VS Editor to create objects in Allplan. Depending on different situations, it will ask the user to save the script, geometry in Allplan, or both.
The new method is to use the Create Object function. It will ask the user to save pyp first and then use that pyp file to generate geometry in Allplan. With that behavior change, closing VS Editor won't create geometry in Allplan anymore.
Known issues:
- VS Editor will ask to save the pyp file each time a user clicks on Create Object. It doesn't remember the last used path for saving.
- A user can create objects from the editor, even if the script occurs some errors.
Copy Nodes across Scripts
The VS editor now supports copying & pasting nodes from one script to another. It currently requires a user to close the existing script. It is only an interim solution for reusing existing nodes.
Known issues:
- Copy nodes from a large script may take a little bit longer.
Quick Insert UX Improvement
The Quick Insert is now hovering over the canvas. Thus, its boundary won't crop the Quick Insert anymore, including the result list.
Stop a Script
Stop a script will remove the previews and empty the PythonPart palette in Allplan.
Known issues:
- Stop a script won't reset the value in the tooltip or watchlist.
New Visual Status for Nodes (preview)
To help a user to understand a script better, we introduce the new visual status for nodes. Depending on the evaluation result, a node will change its color to one of the following colors.
- blue = not evaluated (not calculated)
- green = success
- yellow = warning
- red = error
The difference between a warning and an error is:
- In the case of a warning, the script will continue to run.
- But it won't continue if occurring an error.
Known issues:
- If a script occurs an error after running, the VS Editor can't update the visual status. A user must re-run to update the status.
- Some input nodes, which require an ESC to complete the input, will update their status after a re-run.
- Stop currently won't reset the visual status.
- Sometimes it looks unlogic that VS editor didn't evaluate a node before a failed one. That's because the first added branches will have a higher priority if the script has several ones. If that first branch fails, others won't continue, even if the others are shorter or visually in front. Please check the blue Point3D node in the screenshot below.
How to activate:
Add a new DWORD key VisualStateFeatureFlag under Computer\HKEY_CURRENT_USER\SOFTWARE\Nemetschek\Allplan\2023.0\VisualScripter and set it to 1.
Product Owner API, Allplan GmbH