# Block Editor

The Sherpa Designer interface allows you to create your own blocks and combine them into palettes. User-created blocks and palettes can be combined into packages using the "Package Manager" tool.

<figure><img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-94f1eb73073e24eae9ec812e2c42a10a3797c6fb%2Fimage%20(17).png?alt=media" alt=""><figcaption></figcaption></figure>

Packages can be exchanged through files (the "Local Packages" tab) or through the Orchestrator (the "Remote Packages" tab).

<figure><img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-a031fdcc9529fce89cfc2f313b392e84562fa83a%2Fimage%20(18).png?alt=media" alt=""><figcaption></figcaption></figure>

Developers can create their own block palettes and use similar palettes from other developers by agreement.

<figure><img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-930bff07a92b92b261908a499963f1c759e30c8b%2Fimage%20(16).png?alt=media" alt=""><figcaption></figcaption></figure>

To create a new block, you need to click the button ![](https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-c6a7e5ff76a73298ddcffef57ec416c12a513818%2Fimage%20\(19\).png?alt=media), after which the "My Blocks Editor" window will open.

<figure><img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-3d771afcecf6a4fb0d69134a8d1e3058ff2a825b%2Fimage%20(20).png?alt=media" alt=""><figcaption></figcaption></figure>

<table data-header-hidden><thead><tr><th width="60"></th><th width="209"></th><th></th></tr></thead><tbody><tr><td><strong>No.</strong></td><td><strong>Interface Element</strong></td><td><strong>Description</strong></td></tr><tr><td><ol><li></li></ol></td><td>"File" menu</td><td></td></tr><tr><td>1.1.</td><td>"Delete All Blocks" item</td><td>Allows you to delete all blocks in the block editor.</td></tr><tr><td>1.2.</td><td>"Open File..." item</td><td>Allows you to open a .xaml file to load blocks.</td></tr><tr><td>1.3.</td><td>"Add from File..." item</td><td>Allows you to add blocks from a .xaml file to the current package.</td></tr><tr><td>1.4.</td><td>"Save" item</td><td>Allows you to save the created block or save changes to the edited block. You can also use the keyboard shortcut Ctrl + S to save.</td></tr><tr><td>1.5.</td><td>"Export to File..." item</td><td>Allows you to save the current package of blocks to a separate .xaml file.</td></tr><tr><td>1.6.</td><td>"Close Window" item</td><td>Allows you to close the "My Blocks Editor" window.</td></tr><tr><td><ol start="2"><li></li></ol></td><td>"Edit" menu</td><td></td></tr><tr><td>2.1</td><td>"Correct Block Names"</td><td>Allows you to correct the internal names of blocks according to the required robot standard and exclude duplicate blocks. This may be necessary if you imported blocks from any external palette.</td></tr><tr><td>3.</td><td>"Save" button</td><td>Allows you to save the created block or save changes to the edited block. You can also use the keyboard shortcut Ctrl + S to save.</td></tr><tr><td>4.</td><td>"Export File" button</td><td>Allows you to save the current package of blocks to a separate .xaml file.</td></tr><tr><td>5.</td><td>"Blocks" area</td><td>Allows you to create and manage blocks.</td></tr><tr><td>6.</td><td>"Attributes" area</td><td>Displays the attributes of the selected block.</td></tr><tr><td>7.</td><td>"Properties" area</td><td>Displays the properties of the selected block.</td></tr><tr><td>8.</td><td>"Block Code" area</td><td>Displays the code of the block.</td></tr></tbody></table>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcWHy9mO5J8rxM-PAdnc0GzOz5YADNNhq7ciY4lFPZ3IMcs0OvEoce9Gc9fHnbzynl7D9oNoSqkKaDMSNEBw1PvFs5v0QWGMDAs63wbLdXQIty__3YTcIG50XZyu-PV1woJXBPNEj9a7fCTPTOBh2X69r_e?key=7jQBbYjIJfyxVOeIFCSE-Q" alt=""><figcaption></figcaption></figure>

**The "Blocks" area** allows you to manage your blocks: create and delete them, copy, paste, and move them within the list.

<figure><img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-00d12def888f3be9389428fde6e3aacddf5b6dcf%2Fimage%20(21).png?alt=media" alt=""><figcaption></figcaption></figure>

<table data-header-hidden><thead><tr><th width="59"></th><th width="199"></th><th></th></tr></thead><tbody><tr><td><strong>No.</strong></td><td><strong>Interface Element</strong></td><td><strong>Description</strong></td></tr><tr><td>1.</td><td>button <img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-467a6acfde26a72d8b4a6b9207d99ffff331f16d%2Fimage%20(22).png?alt=media" alt=""></td><td>Allows you to add a new block.</td></tr><tr><td>2.</td><td>button <img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-de80006bf8776756c1a68f391dbbe4a396917579%2Fimage%20(23).png?alt=media" alt=""></td><td>Allows you to delete the selected block.</td></tr><tr><td>3.</td><td>button <img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-2f29a995e6abacc638d357da3bfe523d273b1ce8%2Fimage%20(24).png?alt=media" alt=""></td><td>Allows you to copy the selected block to the clipboard.</td></tr><tr><td>4.</td><td>button <img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-97993aa9e45064f249043ce8655b0d35856376c2%2Fimage%20(25).png?alt=media" alt=""></td><td>Allows you to paste the previously copied block from the clipboard.</td></tr><tr><td>5.</td><td>button <img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-16c4a9b460e78100d439babc06462a4af7d4c3c3%2Fimage%20(26).png?alt=media" alt=""></td><td>Allows you to move the selected block up the list.</td></tr><tr><td>6.</td><td>button <img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-3065fc48bbdeb208ddf78e89786322fe071692b8%2Fimage%20(27).png?alt=media" alt=""></td><td>Allows you to move the selected block down the list.</td></tr></tbody></table>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXd94H2Lyrr9cwMCAMJQGWsVqEEuCreUwVdxWDACIMAAmR7UtQPqcUwhLNWSDBOB9UbtwHeUerGe1MvgJxYgcatXvapwLneF58gi8cg48gLAKaLpACmPfooyODd7lEzfP8-XH2zXsAkaPIsaM_uMDNjSTdua?key=7jQBbYjIJfyxVOeIFCSE-Q" alt=""><figcaption></figcaption></figure>

**The "Attributes" area** allows you to configure the attributes of the selected block and choose an image for the created block.

<figure><img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-a78f9e94fc891319bb574506ad90b89d3d10dfe9%2Fimage%20(32).png?alt=media" alt=""><figcaption></figcaption></figure>

To change a block's attribute, you need to double-click the left mouse button on the field with the current attribute value and enter a new value in that field:

<figure><img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-34651390cc46f39a51fb486b0a4c101f38b7103e%2Fimage%20(29).png?alt=media" alt=""><figcaption></figcaption></figure>

To change the "Image" attribute, you also need to click the button ![](https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-daaeb0afa5e97e326aa7bca0c71b1e1b3afafd20%2Fimage%20\(30\).png?alt=media) to the right of the field with the current attribute value. In the opened window, select an image or click the "Upload Image from File" button and upload the desired image.

<figure><img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-f9af33a4a6acdae5e10ec20c3d4ee2fa9be09703%2Fimage%20(31).png?alt=media" alt=""><figcaption></figcaption></figure>

In the "Attributes" area, you can change the following block attributes:

<table data-header-hidden><thead><tr><th width="58"></th><th width="202"></th><th></th></tr></thead><tbody><tr><td><strong>No.</strong></td><td><strong>Attribute</strong></td><td><strong>Attribute Description</strong></td></tr><tr><td>1.</td><td>Name</td><td>The name of the selected block.</td></tr><tr><td>2.</td><td>Hint</td><td>The hint for the selected block.</td></tr><tr><td>3.</td><td>Image</td><td>The image of the selected block.<br><br>Supported formats for image upload: <code>.jpg</code>, <code>.png</code>, <code>.jpeg</code>.</td></tr><tr><td>4.</td><td>Width</td><td>The width of the block image.</td></tr><tr><td>5.</td><td>Height</td><td>The height of the block image.</td></tr><tr><td>6.</td><td>Version</td><td>The version of the block.<br><br>This attribute is not editable.</td></tr></tbody></table>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXewYKsNvlC4UCJQle3PgF-D2FQjfRPbKt2SVb_1R1v__pq5BQpwBlBDSOks-L8WVcV2jI70Qa9vG5elrItXSexLnLkpGJHZpn74mfgjKbEkSYZUTan19_P1lbMMgmuDF6cY9wBNuLsAWumec9w9WSpkI_PI?key=7jQBbYjIJfyxVOeIFCSE-Q" alt=""><figcaption></figcaption></figure>

**The "Properties" area** allows you to manage and configure the properties of the block.

<figure><img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-1bf54cbbc0bfbad664f229ad516d3187bdbf42c5%2Fimage%20(33).png?alt=media" alt=""><figcaption></figcaption></figure>

<table data-header-hidden><thead><tr><th width="58"></th><th width="206"></th><th></th></tr></thead><tbody><tr><td><strong>No.</strong></td><td><strong>Interface Element</strong></td><td><strong>Description</strong></td></tr><tr><td>1.</td><td>button <img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-50b586522aeb82c3d899f6088da8c93f6b723ce5%2Fimage%20(34).png?alt=media" alt=""></td><td>Allows you to add a new property.</td></tr><tr><td>2.</td><td>button <img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-ea6e7c8b77ea79ec4ebb1e5fc9403ec08623d738%2Fimage%20(35).png?alt=media" alt=""></td><td>Allows you to delete the selected property.</td></tr><tr><td>3.</td><td>button <img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-b9b2d13a5eec7e55eaede6119b7287cfd43d1ba9%2Fimage%20(36).png?alt=media" alt=""></td><td>Allows you to copy the selected property to the clipboard.</td></tr><tr><td>4.</td><td>button <img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-fa3ef60563202b7995aec86ba96df6206c603053%2Fimage%20(37).png?alt=media" alt=""></td><td>Allows you to paste the previously copied property from the clipboard.</td></tr><tr><td>5.</td><td>button <img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-93f1e4f19ca961c0813c0fc315dcef712f6968e8%2Fimage%20(38).png?alt=media" alt=""></td><td>Allows you to move the selected property up the list.</td></tr><tr><td>6.</td><td>button <img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-f22301c167e7c44c3c9a53dd0c732c9afdfb41d2%2Fimage%20(39).png?alt=media" alt=""></td><td>Allows you to move the selected property down the list.</td></tr></tbody></table>

To configure the properties of the block, the following parameters are offered.

<figure><img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-5b79b9a214df23981a658cb86f32583097fcc4c2%2Fimage%20(40).png?alt=media" alt=""><figcaption></figcaption></figure>

<table data-header-hidden><thead><tr><th width="59"></th><th width="204"></th><th></th></tr></thead><tbody><tr><td><strong>No.</strong></td><td><strong>Block Property Parameter</strong></td><td><strong>Description</strong></td></tr><tr><td>1.</td><td>Name</td><td>The name of the block property.<br><br>This name is used in the block code. For example, if the name is set as “InVar”, it should be used in the code as $InVar.</td></tr><tr><td>2.</td><td>Title</td><td>The name of the block in the Designer when creating a diagram.</td></tr><tr><td>3.</td><td>Hint</td><td>A detailed description of the block property.</td></tr><tr><td>4.</td><td>Category</td><td><p>The category of the block property.<br><br>Available values:</p><ul><li>Main properties – main properties;</li><li>Required – required property;</li><li>Output – output property.</li></ul></td></tr><tr><td>5.</td><td>Type</td><td><p>The type of the block property.<br><br>Available values:</p><ul><li>Expression – any expression;</li><li>Variable – only a variable;</li><li>Enum – enumeration;</li><li>Int64 – integer.</li></ul></td></tr><tr><td>6.</td><td>Value</td><td>The initial value of the block property.<br><br>If necessary, an initial value should be set. If the category "output property" is selected, the name of the variable must be specified (for example, <code>$MyVar</code>).<br><br>If the type "enumeration" is selected, the value must be specified without quotes (for example, <code>MyEnum1</code>).</td></tr><tr><td>7.</td><td>Enumeration Value</td><td>The enumeration value of the block property.<br><br>If the type is selected as "enumeration", values must be specified separated by semicolons (for example, <code>MyEnum1;MyEnum2;MyEnum3</code>).</td></tr><tr><td>8.</td><td>Default Value</td><td>The default value of the block property.<br><br>If the property is empty, this value will be used. Applicable only to optional Expression properties.</td></tr></tbody></table>

**The "Block Code" area** allows you to display the code that the block will execute.

<figure><img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-7bde9f330baeb7ca3c2ecb115118b1f592e0c1d1%2Fimage%20(41).png?alt=media" alt=""><figcaption></figcaption></figure>

<table data-header-hidden><thead><tr><th width="57"></th><th width="215"></th><th></th></tr></thead><tbody><tr><td><strong>No.</strong></td><td><strong>Interface Element</strong></td><td><strong>Description</strong></td></tr><tr><td>1.</td><td>button <img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-1ba412ed3c2eaf6800bb404898665ed7640d888f%2Fimage%20(42).png?alt=media" alt=""></td><td>Allows you to undo an action.</td></tr><tr><td>2.</td><td>button <img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-d6d9e878bff7f3d997023d60548def30dea14940%2Fimage%20(43).png?alt=media" alt=""></td><td>Allows you to redo an action.</td></tr><tr><td>3.</td><td>"Add Property" button<br><img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-1e8223f4579da7408fa641fe907d43e1d25007cd%2Fimage%20(44).png?alt=media" alt=""></td><td>Allows you to add a property.</td></tr></tbody></table>
