Product: Mingcedar Studio DESIGNER
Scale | Mingcedar Studio
Map a numeric value to component size, for data bars, level fills and size indicators.
<div class="manual-doc-article manual-doc-article-section"><h2 id="geometry-scale">Geometry: Scale</h2>
Map a numeric value to component size, for data bars, level fills and size indicators.
<div class="doc-card-list">
<article class="doc-card">
<h3 id="geometry-scale-item-1">Overview</h3>
<p>Drag Geometry → Scale onto a component to drive its size from a number.</p>
</article>
<article class="doc-card">
<h3 id="geometry-scale-item-2">How to use it: every control in the editor</h3>
<p>Scale clamps Source value to Limit minimum / Limit maximum and maps that interval to At limit minimum / At limit maximum. The output is a scale factor; 1 preserves the original size. Source minimum / Source maximum are available as ValueMin / ValueMax aliases. Changing the source range alone does not update the input limits.</p>
<ul>
<li>Behavior name is editable; Component name is read-only.</li>
<li>Quality override / Override border by quality configures Good and Bad borders for data quality, separately from process limits.</li>
<li>JS functions... inserts a method into the focused expression field.</li>
<li>Source value returns a number, for example ReadTagDouble("PLC_LINE01.TANK01.LEVEL", 0). Condition returns a boolean; false skips the behavior and does not hide the component.</li>
<li>Source minimum / Source maximum default to 0 / 100 and supply the ValueMin / ValueMax expression aliases.</li>
<li>At limit minimum / At limit maximum specify scale factors, initially 0.5 / 1.5 for a new Scale behavior (change them to 0 / 1 for the level-fill example), at the input-limit endpoints. Capture calculates an endpoint from the component geometry.</li>
<li>Limit minimum / Limit maximum start as independent values 0 / 100 and control clamping and normalization. Enter ValueMin / ValueMax to follow the source range.</li>
<li>Moving edge: Top moves the top edge and fixes the bottom; Right moves the right edge and fixes the left.</li>
<li>Save / Ctrl+S validates and saves; Cancel / Esc discards the edit.</li>
</ul>
<div class="manual-code" data-code-language="text"><div class="manual-code-toolbar"><span>Text</span><span class="manual-code-tools"><small>Text</small><button type="button" data-copy-code data-copied="Copied" data-failed="Select and copy the code" aria-label="Copy code: Text">Copy code</button><span class="manual-code-status" role="status"></span></span></div><pre tabindex="0" class="docs-code-block shiki github-light" style="background-color:#fff;color:#24292e" tabindex="0"><code><span class="line"><span>// Source value</span></span>
<span class="line"><span>ReadTagDouble("PLC_LINE01.TANK01.LEVEL", 0)</span></span>
<span class="line"><span></span></span>
<span class="line"><span>// Source minimum / maximum: 0 / 100</span></span>
<span class="line"><span>// Limit minimum / maximum: ValueMin / ValueMax</span></span>
<span class="line"><span>// At limit minimum / maximum: 0 / 1</span></span>
<span class="line"><span>// Moving edge: Top</span></span></code></pre></div>
</article>
<article class="doc-card">
<h3 id="geometry-scale-item-3">How the Capture buttons work</h3>
<p>The editor records the original size. Resize the same component in PowerPoint and click Capture beside an endpoint. It calculates target size / original size using Moving edge, writes the factor and attempts to restore the original geometry.</p>
<ul>
<li>Choose Moving edge first, because it decides whether the calculation uses width or height and which edge defines the target size.</li>
<li>Top / Bottom use height: Top uses original bottom minus current top, and Bottom uses current bottom minus original top.</li>
<li>Left / Right use width: Left uses original right minus current left, and Right uses current right minus original left.</li>
<li>If the original width/height is zero, the target size would be negative, or the selected object is not the same component, Target warns and refuses to write.</li>
<li>Capture writes a 0.### factor. If you need a fixed expression instead, you can still overwrite At limit minimum / At limit maximum by hand.</li>
</ul>
</article>
<article class="doc-card">
<h3 id="geometry-scale-item-4">When to use it</h3>
<p>Use size to represent a value, for example:</p>
<ul>
<li>Level fill: a fill block inside a tank rises with the level percentage; set Moving edge to Top so the bottom stays fixed.</li>
<li>Bar growth: a throughput or load bar grows from one end with the value; set Moving edge to the edge it grows toward.</li>
<li>Icon response: an icon scales between At limit minimum and At limit maximum with a value as a strength indicator.</li>
</ul>
</article>
<article class="doc-card doc-card-warn">
<h3 id="geometry-scale-item-5">Limitations and troubleshooting</h3>
<p>Check these Scale settings:</p>
<ul>
<li>Moving edge is the edge that moves, not the fixed one: choosing Top means the top edge moves and the bottom is fixed; Left means the left moves and the right is fixed. To keep an edge still, pick its opposite.</li>
<li>At limit minimum / At limit maximum are scale factors, not percentages: the original size is 1.0, not 100.</li>
<li>One Moving edge means one direction: if you pick Right, do not expect it to scale toward both sides; the fixed edge does not move.</li>
<li>Scale has no out-of-range hiding option. A false Condition only skips scaling; use Visibility in State Color or Script Color when the component must be hidden.</li>
<li>Recheck Limit minimum / Limit maximum when changing the input range, or use ValueMin / ValueMax to keep the effective range aligned with the source range.</li>
</ul>
</article>
</div>
<div class="docs-note-grid manual-doc-image-grid">
<figure class="docs-note-card manual-doc-image-card" id="geometry-scale-image-1">
<img src="/WEB_img/HQPPT/current/geometry/scale.png" alt="Scale behavior editor" loading="lazy" decoding="async" />
<figcaption>
<strong>Figure 1: Scale editor</strong>
<p>Map a value into a scale factor and use Moving edge to choose which edge moves and which stays fixed.</p>
</figcaption>
</figure>
</div>
</div>