- You need a Designer license
- You should have read the following tutorial: arKItect Designer Getting Started
- You need to create a new empty project
To run a script, there are some prerequisites:
arKItectand create a new project without a template
- Create a Program attribute at the root of Rules (used to store the script and launch it)
- In order to launch the script, we need to have at least one projection where the script is accessible, so create a filter (named all for example) where all rules are checked
Creation of your first script
Now you can create and run your first script.
To get started, we can try to run a "Hello world" program:
It is important to know that all the code you write must be in a function with a parameter self (the function can be named as you want). The value of self represents a reference to the object where this script is run (near the root object in view all).
A script to create a simple meta-model
Create a simple architecture with flow connecting functions allocated to systems.
Add attributes to a given type
We can see that the attributes have been created by a script.
Change the properties of a given type
The roperties have been changed.
In the filter Functions, no rules are checked, so we need check the rule Function in this filter.
Add data in the project
We will try to add some data to check if our meta-model works fine.
Do the same actions in only one script
You can write all previous scripts in only one script: