ObjectCreator
From KIproBatt Wiki
(Updated with content from Extension:OpenSemanticLab version 0.0.3) |
(Updated with content from Extension:OpenSemanticLab version 0.0.3) |
||
Line 11: | Line 11: | ||
<includeonly>{{#vardefine: i | {{{start|1}}} }}{{#while: | <includeonly>{{#vardefine: i | {{{start|1}}} }}{{#while: | ||
| {{#ifexpr: {{#var: i }} <= {{#expr:{{#var: {{{count_source_name|}}}_actual_number_of_objects|{{{count|0}}}}} + {{{start|1}}} - 1}} | true }} | | {{#ifexpr: {{#var: i }} <= {{#expr:{{#var: {{{count_source_name|}}}_actual_number_of_objects|{{{count|0}}}}} + {{{start|1}}} - 1}} | true }} | ||
− | | {{#vardefine: id_postfix | {{#ifexpr: {{#var: i }} <= 9 |0|}}{{#var: i }}-{{{id_postfix|mi}}} }}{{#vardefine: type | {{#ifeq: {{{type|}}}|from_mapping|{{#ask: [[IsObjectParameterOf::{{FULLPAGENAME}}#{{#replace: {{PAGENAME}}|00-pi|{{#var: id_postfix }}}}]] |?HasPredecessor.IsInstanceOf.-HasPredecessor |mainlabel=- |link=none |headers=hide |format=plain}}|{{{type|}}} }} }}{{{name| | + | | {{#vardefine: id_postfix | {{#ifexpr: {{#var: i }} <= 9 |0|}}{{#var: i }}-{{{id_postfix|mi}}} }}<!-- |
+ | -->{{#vardefine: type | <!-- set object type | ||
+ | -->{{#ifeq: {{{type|}}}|from_mapping|<!-- query the asigned predecessing (material) type and asign it successor | ||
+ | -->{{#ask: [[IsObjectParameterOf::{{FULLPAGENAME}}#{{#replace: {{PAGENAME}}|00-pi|{{#var: id_postfix }}}}]] |?HasPredecessor.IsInstanceOf.-HasPredecessor |mainlabel=- |link=none |headers=hide |format=plain}}|<!-- else use specified type | ||
+ | -->{{{type|}}} }}<!-- | ||
+ | -->}}<!-- create object | ||
+ | -->{{OslTemplate:LabProcess/Object/ById | ||
+ | |id_postfix={{#var: id_postfix }} | ||
+ | |label={{{name|Object}}} {{#expr:{{#var: i }}+{{{name_start|{{{start|1}}}}}}-{{{start|1}}}}} | ||
+ | |type={{#var: type }} | ||
+ | |global={{{global|}}} | ||
+ | }};<!-- | ||
+ | -->{{#vardefine: i | {{#expr: {{#var: i }} + 1 }} }} | ||
}}</includeonly> | }}</includeonly> |
Latest revision as of 05:23, 17 May 2022
count_source_name = Name des Prozessschrittes, aus dem die Anzahl stammt count = Fixe Anzahl (alternativ zu count_source_name) name = Name / Prefix der generierten Objecte (Default: Objekt) type = konkreter Typ/Material der generierten Object oder 'from_mapping' um automatisch vom Vorgängermaterial abzuleiten (optional) id_postfix = Typkürzel (Default: mi) start = Startwert für die ID (Default: 01) name_start = Startwert für die Bennenung (Default: start,1)