Skip to content

Edit and configure template instances | Mingcedar Studio

Templates → Library provides search, insertion, saving, metadata, import/export and deletion.

Template methodsTemplatesDocumentation revised: 2026-10-21
Templates

Edit and configure template instances

Templates → Library provides search, insertion, saving, metadata, import/export and deletion.

Open the library and find a template

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.

  • No result: clear Search and confirm the template exists in the current user's local library.
  • Many groups: scroll the library area to the required Group.
  • After selecting a card, Export and Delete enable or disable according to the template type.
Insert by double-click, drag, or context menu

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.

  • Fast insertion on the current slide: double-click.
  • Control the drop position: drag the card onto the slide.
  • Menu operation: choose Insert Template.
  • After insertion, verify Instance, Template, and Group.
Save selected PowerPoint content as a new template

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.

  • Template name: required; use a name that identifies the device or purpose.
  • Group: choose an existing group or type a new one; blank becomes Ungrouped.
  • Sort order: an integer from 1 to 99999; lower values appear first.
  • Captured variables: confirm every <variable> and its letter case.
  • After saving, search by name and confirm that the card appears.
Update an existing template source

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.

  • Update the original template: edit and save from its source presentation.
  • Keep the old template as a version: save the presentation separately and use a new template name.
  • Insert a new instance after the update and test it.
Reorder Captured variables

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.

  • Drag the row handle to a new position.
  • Use the up or down arrow to move one place.
  • Use Ctrl+Up or Ctrl+Down from the keyboard.
  • Resolve variable-case warnings in the source objects before saving.
  • A template with no variables can still be saved; use <Title> style placeholders for editable text.
Import and export .hqtpl files

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.

  • Select the target before Export; built-in templates normally cannot be exported.
  • Include template name and version in the exported file name.
  • After Import, search by name, insert one instance, and test it.
  • For an untrusted source, choose Import without scripts and review behaviors manually.
Edit fields, edit behavior, or delete

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.

  • Metadata only: Edit fields....
  • Behavior inside the template: Edit Template Behavior.
  • Current inserted instance position or type-specific fields: choose Templates → Edit Instance on the ribbon to open Template Edit.
  • Export a .hqtpl archive before deleting a template that may be needed later.
Choose the value mechanism before authoring

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.

  • Template instance variable: filled after insertion, such as <PLC> or <RUN_TAG>.
  • Input template value: entered at runtime and read with template.getValue("instance name").
  • Runtime Variable: temporary state shared inside the current runtime page.
  • Page or popup parameter: sent while opening the destination and read with GetPageParameter*.
  • PLC Tag: device data binding. Shared access from several pages is not page-parameter passing.
1. Build a parameterized template from scratch

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.

  • Visible text: Device <DEVICE_NO>.
  • Tag path: <PLC>.<RUN_TAG>.
  • Script string: ReadTagBoolean("<PLC>.<RUN_TAG>", false).
  • Bit reference: <STATUS_TAG>[3]; keep the bit index outside the placeholder.
  • Parameterize only values that genuinely vary by instance.
var running = ReadTagBoolean("<PLC>.<RUN_TAG>", false);
var alarming = GetAlarmTags([
  "<PLC>.<ALARM_TAG>"
]);

return running && !alarming;
2. Name placeholders and compose tag paths

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.

  • Valid names include <PLC>, <DB_01>, and <DEVICE_NO>.
  • Correct path: <PLC>.<RUN_TAG>; incorrect: <PLC.RUN_TAG>.
  • Correct bit reference: <STATUS_TAG>[3]; incorrect: <STATUS_TAG[3]>.
  • Do not use <RUN-TAG> or <RUN TAG>.
  • Case differences create different fields; keep one spelling for one meaning.
// Instance: PLC=LINE01, RUN_TAG=PUMP01.RUN
ReadTagBoolean("<PLC>.<RUN_TAG>", false)
// Exported target: LINE01.PUMP01.RUN
3. Save and review Captured variables

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.

  • Template name: identify the device or purpose, for example Pump faceplate.
  • Group: organize by process, equipment, or project.
  • Sort order: lower values appear earlier in the library.
  • Captured variables: verify every name, count, and order.
  • After saving, insert a fresh instance from the library and test it.
4. Insert an instance and fill its variables

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.

  • Select the instance root, not a child shape inside it.
  • Enter replacement values without angle brackets, for example LINE01 for PLC.
  • The same placeholder in text, behavior tags, and script strings receives one instance value.
  • A blank can be saved during editing, but tag placeholders must be resolved before final export.
  • Reopen Template Edit and confirm values, position, and size after saving.
PLC       = LINE01
RUN_TAG   = PUMP01.RUN
ALARM_TAG = PUMP01.ALARM
// <PLC>.<RUN_TAG> -> LINE01.PUMP01.RUN
5. Input values and cross-page parameters

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.

  • Plain Input: the value stays on that Input instance until a script reads it.
  • Runtime Variable: temporary same-page linkage; do not treat it as durable cross-page state.
  • PLC Tag mode: confirmation submits according to host permission and write rules.
  • Page parameters: a contract between the opening page and the destination.
  • For complete open-and-receive examples, continue to Script scope and parameter passing.
var setpoint = template.getValue("Speed input");

var deviceCode = GetPageParameter("deviceCode", "");
var editMode = GetPageParameter("editMode", "false") === "true";
6. Configure Alarm columns and filter scope

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.

  • Tags: full device-code.tag-code, for example <PLC>.<ALARM_TAG>.
  • PLC codes: device-code only, for example <PLC>.
  • Function groups: device-code.group-code.
  • Device groups: device-code.group-code.
  • Signal groups: device-code.group-code.
  • An empty filter dimension adds no extra restriction; test with a known active alarm after export.
7. Test active alarms in template scripts

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.

  • GetAlarmTags(values): match full tag codes.
  • GetAlarmPlcCodes(values): match PLC or device codes.
  • GetAlarmFunctionGroupCodes(values): match function-group codes.
  • GetAlarmDeviceGroupCodes(values): match device-group codes.
  • GetAlarmSignalGroupCodes(values): match signal-group codes.
var hasTagAlarm = GetAlarmTags([
  "<PLC>.<ALARM_TAG>"
]);

var hasDeviceAlarm = GetAlarmDeviceGroupCodes([
  "<PLC>.<DEVICE_GROUP>"
]);

return hasTagAlarm || hasDeviceAlarm;
8. Pre-export validation and troubleshooting

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.

  • Unresolved <variable>: check for an empty instance field or an unsupported placement.
  • Missing Captured variable: check whether a dot, hyphen, space, or bit index was put inside the name.
  • Placeholder unchanged in a script: keep it inside a JavaScript string literal.
  • Value lost after navigation: it may need a page parameter instead of a Runtime Variable.
  • Wrong alarm scope: distinguish full tags, PLC codes, and the three group-code fields.
  • After updating a template, validate a newly inserted instance.
Current Save as template UI with template name, group, sort order, and Captured variables
Save and review a template

Current Save as template UI: verify identity, grouping, ordering, and Captured variables before saving.

Current Edit template instance UI with position, size, and template variables
Fill instance variables

Template Edit changes only the selected instance. Verify its source and geometry before filling values.

Current Alarm template editor with visible columns and alarm filters
Configure an Alarm template

Choose the required alarm columns and limit scope by tag, PLC, function group, device group, or signal group.

Click the image again or press Esc to close