Product: Mingcedar Studio DESIGNER
Edit and configure template instances | Mingcedar Studio
Templates → Library provides search, insertion, saving, metadata, import/export and deletion.
<section id="template-edit" class="docs-block docs-block-intro docs-block-current"> <span class="section-kicker">Templates</span> <h2>Edit and configure template instances</h2> <p>Templates → Library provides search, insertion, saving, metadata, import/export and deletion.</p> <div class="docs-detail-list"> <article id="template-edit-item-1" class="docs-detail-row"> <strong>Open the library and find a template</strong> <p>Open MX Design → Templates → Library. Search by name, group or keyword; results update after typing stops and remain grouped. Check the card name and preview before acting.</p> <ul> <li>No result: clear Search and confirm the template exists in the current user's local library.</li><li>Many groups: scroll the library area to the required Group.</li><li>After selecting a card, Export and Delete enable or disable according to the template type.</li> </ul> </article><article id="template-edit-item-2" class="docs-detail-row"> <strong>Insert by double-click, drag, or context menu</strong> <p>Double-click a card, drag it to the slide or choose Insert Template. Select the new instance and fill its variables and position in Template Edit.</p> <ul> <li>Fast insertion on the current slide: double-click.</li><li>Control the drop position: drag the card onto the slide.</li><li>Menu operation: choose Insert Template.</li><li>After insertion, verify Instance, Template, and Group.</li> </ul> </article><article id="template-edit-item-3" class="docs-detail-row"> <strong>Save selected PowerPoint content as a new template</strong> <p>Select one or more reusable objects on the slide and click Save in the library. In Save as template, fill Template name, Group, and Sort order; review Captured variables and their order; then choose Save template. A new template cannot be created with no selected content.</p> <ul> <li>Template name: required; use a name that identifies the device or purpose.</li><li>Group: choose an existing group or type a new one; blank becomes Ungrouped.</li><li>Sort order: an integer from 1 to 99999; lower values appear first.</li><li>Captured variables: confirm every <variable> and its letter case.</li><li>After saving, search by name and confirm that the card appears.</li> </ul> </article><article id="template-edit-item-4" class="docs-detail-row"> <strong>Update an existing template source</strong> <p>If the current PPT is an existing template source, Save updates it in place and retains its ID and sort order. Check the preview, name, group and variables afterward.</p> <ul> <li>Update the original template: edit and save from its source presentation.</li><li>Keep the old template as a version: save the presentation separately and use a new template name.</li><li>Insert a new instance after the update and test it.</li> </ul> </article><article id="template-edit-item-5" class="docs-detail-row"> <strong>Reorder Captured variables</strong> <p>Variable order sets Template Edit field order. Drag rows, use arrow buttons or Ctrl+Up / Ctrl+Down; put frequent fields such as PLC and equipment code first.</p> <ul> <li>Drag the row handle to a new position.</li><li>Use the up or down arrow to move one place.</li><li>Use Ctrl+Up or Ctrl+Down from the keyboard.</li><li>Resolve variable-case warnings in the source objects before saving.</li><li>A template with no variables can still be saved; use <Title> style placeholders for editable text.</li> </ul> </article><article id="template-edit-item-6" class="docs-detail-row"> <strong>Import and export .hqtpl files</strong> <p>Select a custom template and click Export to create a .hqtpl file. On another computer, click Import and choose that file. If the template contains behavior scripts, review the script warning and choose whether to trust the scripts or import without them.</p> <ul> <li>Select the target before Export; built-in templates normally cannot be exported.</li><li>Include template name and version in the exported file name.</li><li>After Import, search by name, insert one instance, and test it.</li><li>For an untrusted source, choose Import without scripts and review behaviors manually.</li> </ul> </article><article id="template-edit-item-7" class="docs-detail-row"> <strong>Edit fields, edit behavior, or delete</strong> <p>The card menu provides Edit Template Behavior and Edit fields.... Use Edit fields... for name, group, sort order, and variable order. Use Edit Template Behavior for behaviors inside the template. Delete removes the selected custom template; built-in templates are normally protected.</p> <ul> <li>Metadata only: Edit fields....</li><li>Behavior inside the template: Edit Template Behavior.</li><li>Current inserted instance position or type-specific fields: choose Templates → Edit Instance on the ribbon to open Template Edit.</li><li>Export a .hqtpl archive before deleting a template that may be needed later.</li> </ul> </article><article id="template-edit-item-8" class="docs-detail-row"> <strong>Choose the value mechanism before authoring</strong> <p>Choose by when the value is known: template variables for instance addresses, Input or Runtime Variable for temporary page input, and page parameters for navigation context.</p> <ul> <li>Template instance variable: filled after insertion, such as <PLC> or <RUN_TAG>.</li><li>Input template value: entered at runtime and read with template.getValue("instance name").</li><li>Runtime Variable: temporary state shared inside the current runtime page.</li><li>Page or popup parameter: sent while opening the destination and read with GetPageParameter*.</li><li>PLC Tag: device data binding. Shared access from several pages is not page-parameter passing.</li> </ul> </article><article id="template-edit-item-9" class="docs-detail-row"> <strong>1. Build a parameterized template from scratch</strong> <p>Draw and configure the components, then group them for reuse. Replace per-instance differences with angle-bracket placeholders in text, Tag fields or script strings. In scripts, keep placeholders inside string literals.</p> <ul> <li>Visible text: Device <DEVICE_NO>.</li><li>Tag path: <PLC>.<RUN_TAG>.</li><li>Script string: ReadTagBoolean("<PLC>.<RUN_TAG>", false).</li><li>Bit reference: <STATUS_TAG>[3]; keep the bit index outside the placeholder.</li><li>Parameterize only values that genuinely vary by instance.</li> </ul> <pre class="docs-code-block"><code>var running = ReadTagBoolean("<PLC>.<RUN_TAG>", false);
var alarming = GetAlarmTags([
"<PLC>.<ALARM_TAG>"
]);
return running && !alarming;</code></pre> </article><article id="template-edit-item-10" class="docs-detail-row"> <strong>2. Name placeholders and compose tag paths</strong> <p>Wrap each variable in one pair of angle brackets. Use short ASCII uppercase names such as <PLC>, <DEVICE_NO>, and <RUN_TAG> in shared templates. Names may also contain non-ASCII letters, but cannot contain dots, hyphens, or spaces. Build Tag paths from variables and fixed separators.</p> <ul> <li>Valid names include <PLC>, <DB_01>, and <DEVICE_NO>.</li><li>Correct path: <PLC>.<RUN_TAG>; incorrect: <PLC.RUN_TAG>.</li><li>Correct bit reference: <STATUS_TAG>[3]; incorrect: <STATUS_TAG[3]>.</li><li>Do not use <RUN-TAG> or <RUN TAG>.</li><li>Case differences create different fields; keep one spelling for one meaning.</li> </ul> <pre class="docs-code-block"><code>// Instance: PLC=LINE01, RUN_TAG=PUMP01.RUN
ReadTagBoolean("<PLC>.<RUN_TAG>", false)
// Exported target: LINE01.PUMP01.RUN</code></pre> </article><article id="template-edit-item-11" class="docs-detail-row"> <strong>3. Save and review Captured variables</strong> <p>Select the group, save it in Templates and fill its name, group and order. Check Captured variables: fix missing or case-duplicated names in the source. Their order controls Template Edit field order.</p> <ul> <li>Template name: identify the device or purpose, for example Pump faceplate.</li><li>Group: organize by process, equipment, or project.</li><li>Sort order: lower values appear earlier in the library.</li><li>Captured variables: verify every name, count, and order.</li><li>After saving, insert a fresh instance from the library and test it.</li> </ul> </article><article id="template-edit-item-12" class="docs-detail-row"> <strong>4. Insert an instance and fill its variables</strong> <p>Insert a template, select its root group and open Templates → Edit Instance. Check identity and position, then fill Template variables. Values affect this instance only and copy with it.</p> <ul> <li>Select the instance root, not a child shape inside it.</li><li>Enter replacement values without angle brackets, for example LINE01 for PLC.</li><li>The same placeholder in text, behavior tags, and script strings receives one instance value.</li><li>A blank can be saved during editing, but tag placeholders must be resolved before final export.</li><li>Reopen Template Edit and confirm values, position, and size after saving.</li> </ul> <pre class="docs-code-block"><code>PLC = LINE01
RUN_TAG = PUMP01.RUN
ALARM_TAG = PUMP01.ALARM
// <PLC>.<RUN_TAG> -> LINE01.PUMP01.RUN</code></pre> </article><article id="template-edit-item-13" class="docs-detail-row"> <strong>5. Input values and cross-page parameters</strong> <p>Use Input for runtime entry. Read Plain Input with template.getValue("input instance name"); use Runtime Variable for same-page state. Pass device code or mode through navigation parameters, then read with GetPageParameter and explicitly convert numbers or booleans.</p> <ul> <li>Plain Input: the value stays on that Input instance until a script reads it.</li><li>Runtime Variable: temporary same-page linkage; do not treat it as durable cross-page state.</li><li>PLC Tag mode: confirmation submits according to host permission and write rules.</li><li>Page parameters: a contract between the opening page and the destination.</li><li>For complete open-and-receive examples, continue to Script scope and parameter passing.</li> </ul> <pre class="docs-code-block"><code>var setpoint = template.getValue("Speed input");
var deviceCode = GetPageParameter("deviceCode", "");
var editMode = GetPageParameter("editMode", "false") === "true";</code></pre> </article><article id="template-edit-item-14" class="docs-detail-row"> <strong>6. Configure Alarm columns and filter scope</strong> <p>An Alarm template controls both the visible columns and the alarm scope. Select only the required columns from Time, Message, Level, PLC, Function Group, Device Group, Signal Group, Tags, Status, and Acknowledged. Then enter project codes in the relevant filters. Separate several values with commas or lines and use codes rather than display names.</p> <ul> <li>Tags: full device-code.tag-code, for example <PLC>.<ALARM_TAG>.</li><li>PLC codes: device-code only, for example <PLC>.</li><li>Function groups: device-code.group-code.</li><li>Device groups: device-code.group-code.</li><li>Signal groups: device-code.group-code.</li><li>An empty filter dimension adds no extra restriction; test with a known active alarm after export.</li> </ul> </article><article id="template-edit-item-15" class="docs-detail-row"> <strong>7. Test active alarms in template scripts</strong> <p>Alarm helpers return whether an active alarm matches the scope, for driving icons, colors or text. They accept arrays or comma/newline-separated text; they do not query history or acknowledge alarms.</p> <ul> <li>GetAlarmTags(values): match full tag codes.</li><li>GetAlarmPlcCodes(values): match PLC or device codes.</li><li>GetAlarmFunctionGroupCodes(values): match function-group codes.</li><li>GetAlarmDeviceGroupCodes(values): match device-group codes.</li><li>GetAlarmSignalGroupCodes(values): match signal-group codes.</li> </ul> <pre class="docs-code-block"><code>var hasTagAlarm = GetAlarmTags([
"<PLC>.<ALARM_TAG>"
]);
var hasDeviceAlarm = GetAlarmDeviceGroupCodes([
"<PLC>.<DEVICE_GROUP>"
]);
return hasTagAlarm || hasDeviceAlarm;</code></pre> </article><article id="template-edit-item-16" class="docs-detail-row"> <strong>8. Pre-export validation and troubleshooting</strong> <p>Insert at least two instances with different values and verify that their text, tags, alarm scope, and interactions remain independent. Check where Input values are stored and verify page-parameter field names and destination defaults. If export reports an unresolved variable, fill the instance or correct the source template instead of hiding the issue with fixed text.</p> <ul> <li>Unresolved <variable>: check for an empty instance field or an unsupported placement.</li><li>Missing Captured variable: check whether a dot, hyphen, space, or bit index was put inside the name.</li><li>Placeholder unchanged in a script: keep it inside a JavaScript string literal.</li><li>Value lost after navigation: it may need a page parameter instead of a Runtime Variable.</li><li>Wrong alarm scope: distinguish full tags, PLC codes, and the three group-code fields.</li><li>After updating a template, validate a newly inserted instance.</li> </ul> </article> </div> <div class="docs-note-grid"> <figure id="template-edit-image-1" class="docs-note-card manual-doc-image-card"> <img src="/WEB_img/HQPPT/current/templates/save-template.png" alt="Current Save as template UI with template name, group, sort order, and Captured variables" loading="lazy" decoding="async"> <figcaption> <strong>Save and review a template</strong> <p>Current Save as template UI: verify identity, grouping, ordering, and Captured variables before saving.</p> </figcaption> </figure><figure id="template-edit-image-2" class="docs-note-card manual-doc-image-card"> <img src="/WEB_img/HQPPT/current/templates/edit-instance-variables.png" alt="Current Edit template instance UI with position, size, and template variables" loading="lazy" decoding="async"> <figcaption> <strong>Fill instance variables</strong> <p>Template Edit changes only the selected instance. Verify its source and geometry before filling values.</p> </figcaption> </figure><figure id="template-edit-image-3" class="docs-note-card manual-doc-image-card"> <img src="/WEB_img/HQPPT/current/templates/edit-alarm-template.png" alt="Current Alarm template editor with visible columns and alarm filters" loading="lazy" decoding="async"> <figcaption> <strong>Configure an Alarm template</strong> <p>Choose the required alarm columns and limit scope by tag, PLC, function group, device group, or signal group.</p> </figcaption> </figure> </div> </section>