Label Control
បើកកម្មវិធីបង្កើតកន្សោមស្លាកជាទម្រង់មើលឃើញ ដែលផ្សំស្លាក Arcade ច្រើនបន្ទាត់ពីវាល និងអនុគមន៍ ជាមួយការមើលជាមុនផ្ទាល់ និងការគ្រប់គ្រងពុម្ពអក្សរ ទំហំ និងពណ៌តាមផ្នែក។
- រកឃើញនៅឯណា
- KGA Toolbox ▸ Data Management ▸ Quick Label ▸ Label Control
ទិដ្ឋភាពទូទៅ
ArcGIS Pro's own label expression box is a plain text editor — you write Arcade by hand and find out whether it works by applying it. This tool builds the expression from a row-based interface, previews the rendered result as you go, and lets each segment carry its own formatting.
ការប្រើប្រាស់
- The dialog is organised around a list of expression rows. Each row contributes one segment of the finished label, and the rows are joined in order.
- Each row is a single-line card. Drag a card (by its ⋮⋮ grip or any empty part of the card) and drop it on the top or bottom half of another card to reorder; a blue line shows where it will land. Rows are otherwise managed with:
| Control | Effect |
|---|---|
| + Click to add new expression line / + New | Adds a row |
| Duplicate (copy icon) | Copies a row, keeping its formatting |
| ✕ | Removes a row |
| Reset | Clears the builder |
| Reload from layer | Reads the expression currently on the layer back into the builder |
| Copy | Copies the generated Arcade expression to the clipboard |
- Concatenation mode controls how each row joins to the next:
NewLineis how a stacked label — parcel number above area, for example — is built.
| Mode | Joins with |
|---|---|
NoSpace | Nothing — segments run together |
Space | A single space |
Custom | Text you supply |
NewLine | A line break, producing a stacked multi-line label |
Tab | A tab |
- Functions are available per row and cover the usual label needs: The menu is filtered by the field's type. Each function declares what it applies to — text only, number only, date only, or any type — so a text field does not offer
Roundand a number field does not offerUpper. If a function you expect is missing, check the field type of the row you are editing. Several take extra arguments, pre-filled with a sensible default you then edit:Left/Righttake a character count,Mida start and length,Replacea find and replace pair,Rounda number of decimal places, andTexta format string such as"#,##0.00".DefaultValueis worth noting — it substitutes a fallback where a field is null, which avoids the blank and<Null>labels that plague real data.IIFandWhencover conditional text, andDecodemaps a coded value to a readable one. UseSuperscript (sup)for units such as m².
| Group | Functions |
|---|---|
| Text | Upper, Lower, Proper, Trim, Left, Right, Mid, Replace, Concatenate, Find, Length |
| Numeric | Round, Ceil, Floor, Abs, Text |
| Date | Year, Month, Day, Hour, Minute, Now |
| Logic | IIF, Decode, When, DefaultValue |
| Formatting | Superscript (sup), Subscript (sub) |
| Custom | Custom Arcade expression… — write your own Arcade for the row |
- Custom Arcade expression… (top of the fx menu) opens an editor seeded with the row's value, for arithmetic between fields and values such as
Round($feature.Shape_Area / 10000, 2)for hectares. The editor inserts fields and operators, and Test evaluates the expression against the first feature of the layer; syntax errors are reported before the row is accepted. - Formatting can be set globally — Global Font Name, Global Size, Global Font Style (Regular, Bold, Italic, Bold Italic), Global Color — and then overridden on individual rows (font, size, font style, colour; blank means use the global value), so one segment can be bold or coloured while the rest stays plain. For Khmer text, choose a Unicode Khmer font such as
Khmer OSorHanuman. - Label Class selects which of the layer's label classes the expression is written to, so existing label classes need not be disturbed. Label Position is picked visually, between the expression and the preview: point layers show a 3×3 anchor grid around the point (plus Best Position); line and polygon layers show drawn tiles for each Maplex placement method.
- The Preview pane renders the label as it will appear, segment formatting included. Check it before applying — it catches null-value and spacing problems that are invisible in the raw expression.
- Labeling applies the expression to the chosen label class and turns labelling on.
- Unlike Show Area and the Display tools, this builder writes a normal label class. The result is saved with the project, prints, and can be edited afterwards in the standard Labeling ribbon.
ប៉ារ៉ាម៉ែត្រ
This tool opens a window rather than a geoprocessing dialog. Its controls are:
| ផ្ទាំងគ្រប់គ្រង | ការពិពណ៌នា |
|---|---|
| Layer | The feature layer to label. |
| Label Class | The label class the expression is written to. |
| Label Position | The label placement, chosen from the anchor grid (points) or drawn placement tiles (lines, polygons). |
| Source | The field or function inserted into the current row. |
| Expression rows | The ordered segments making up the label, each with its own function, concatenation mode, and optional formatting override. |
| Global Font Name | The default font for all segments. Choose a Unicode Khmer face for Khmer text. |
| Global Size | The default text size. |
| Global Font Style | The default font style: Regular, Bold, Italic, or Bold Italic. |
| Global Color | The default text colour. |
| Current Label Expression | The generated Arcade expression, read-only. Use Copy to take it elsewhere. |
| Preview | A live rendering of the finished label. |
របៀបប្រើ
- In the Contents pane, select the layer to label.
- On the KGA Toolbox tab, in the Data Management group, open the Quick Label menu and click Label Control.
- Confirm Layer and choose the Label Class to write to.
- Click + Click to add new expression line and pick a field in Source.
- Add further rows for each segment. Set each row's concatenation mode — use
NewLinewhere the label should stack onto a second line. - Apply a function to a row where the raw field value is not what you want —
Roundfor an area,DefaultValueto avoid a blank label,Superscript (sup)for a unit. - Set Global Font Name, Global Size, Global Font Style, and Global Color, then override individual rows as needed.
- Check the Preview pane. Confirm null values and spacing look right.
- Click Labeling to apply the expression and switch labelling on.
ព័ត៌មានអាជ្ញាបណ្ណ
Requires an active KGA Toolbox license. The tool validates the license before running.