Template OpenBuildings GenerativeComponents® scripts are delivered with OpenBuildings Designer. For utilization of these scripts it is required to install the Companion Features OpenBuildings GenerativeComponents and OpenBuildings Station Designer. If one or both or these were not installed, they can be installed by using the installer Modify option.
The scripts are contained in files in the folder: C:\ProgramData\Bentley\OpenBuildings CONNECT Edition\Configuration\WorkSpaces\Station_Examples\worksets\StationDesignerTemplate_NM\Standards\Seed\
For earlier versions where OpenBuildings Station Designer was a separet application they are in the folder: C:\ProgramData\Bentley\OpenBuildings CONNECT Edition\Configuration\Datasets\DatasetExtensions\Station_Designer\Seed\
These examples are provided based on the concept of learning scripting through copy/paste/modify. The copy/paste is achieved by creating a new file using a script template as seed file.
The three script templates are as follows, futher details for each are found on the linked pages:
All scripts generate geometry onto levels. The level names are parametric inputs and can be adjusted to match the project requirements. Level assignments are the easiest way to control visibility for all generated geometry. The levels are maintained when geometry is exported.
Note that the ease of manipulating the content or erasing it by unplaying the scripts makes GenerativeComponents script files "unreliable" candidates for direct referencing into a project context. Therefore, all scripts export the main geometry they generate. Most of the supporting constructions are not exported because they are usually meaningless outside of the parametric construction context. The Export nodes are set to manual export, which means that users need to press the Export button on the Export nodes to write the geometry to a DGN file. This permits the highest level of control about the "product" shared when running the scripts.
To a considerable extent the scripts are self-documenting, using meaningful names throughout. Several of the scripts include in their list of Transactions additional comments denoting purpose of sections of transactions.
The alignment geometry can be modified by changing the input to the ReferenceAttachment node in the scripts. The low and high points for the respective Range nodes may need to be adjusted so that the referenced alignments are properly captured. The PolyLine.FromElementsInRange are set to use the ranges in "Overlap" mode, which makes the scripts more flexible. However, it may be necessary to double-check whether alignments are properly captured in the Range.
If more alignments are in the referenced file, the desired alignments should be identified by using the various filter options in the FromElementsInRange technique. This differentiation is a matter of coordination with the team members generating the alignments with products like OpenRail Designer.
If alignments are in "civil space" rather than "building space" please refer to the geo-coordination training how this should be handled. Alternatively, implement an additional CoordinateSystem node which moves and, if necessary, rotates the alignments into "building space". GenerativeComponents requires geometry to be in the Solids Area defined in the DGN file settings. These settings are delivered through the dataset and should not be changed so that all operations are consistent from design to documentation.