Basic Functions
In this tutorial we will see how to construct a workspace out of basic nodes and get an overview of all core functions.
Create a Workspace
To create a new workspace:
- Open
Explorer Panel. - Click the
+tool button inMy Itemscollection to open theNew Workspacepopup. - Enter
Location- dot separated path of the new workspace in the tree, should not be empty and should not contain spaces. Acceptable locations are for example: "tutorial", "my.things". - Enter
Name- name of the new workspace, use PascalCase. - Click
Create- the new workspace will open and become active in theTask Bar.
You can then open the Design tab to enter edit mode. Empty workspace has no nodes, and you
can see the view area at the top left corner. You can pan working area by clicking right mouse
button or wheel button and drag it. View area is of zero size by default and should be expanded
if you are planning on using visual nodes. View area can only be expanded to the right and down,
so you can only resize it by using right or bottom edges.
When you resize the view area and switch to view mode, you can see the empty outline of the same size - nodes within the area will be visible there.
Add Nodes and Connections
Now while in edit mode, open Explorer Panel and find TextValue node under com.dmc.std.text.
Drag and drop the item from the panel to workspace. Position and resize it as you see fit.
TextValue node is used both for input and display of text. When value comes to input slot in,
the node converts it to string and displays in the edit area. Any changes in the edit area will
also update the output slot out.
If you switch to view mode, you can see the added nodes if they are placed within the view area.
In view mode you cannot see slots and connections and cannot add, move or delete nodes. But you
can interact with visible nodes. So TextValue nodes in view mode are represented by text input
boxes.
If you connect one node's output to another node's input, the value produced by the first node will be passed to the second, and the second node will display the same value. You can see it if you edit the text in the first node. Connection is created when you click and drag a slot and drop the other end of the connection on another slot. Note that input slots are always on the left side of nodes and output slots are on the right.
When you edit the text, the value is not immediately applied, you either need to navigate outside
of the edit box, or press Ctrl-Enter.
Miscellaneous
Edit mode provides many different capabilities. Here are some of them:
- You can zoom-in and out using mouse wheel, current position of the cursor is the center of zoom.
- Connections can be selected and dragged off the current target. You can drop connection onto some other slot, or just drop it anywhere in the workspace, in this case the connection will be removed.
- You can select node, slots and connections by clicking on them once. If you select a slot, the popup with information will stay on the screen and you can inspect or copy the content of the slot.
- Selecting nodes will display node properties on the side panel. All nodes have common
Nodeproperties category with label. The label is used for node identification, it doesn't have to be unique. If you change the label, you can notice that the header of the node in workspace also changes. - Another common property is
frameless, when enabled, it will hide the frame of the node in view mode. It can help in constructing visually less busy workspaces. lockedproperty locks current connections and slots. You cannot remove or retarget connections that are a part of a locked node, and you cannot add new connections to a locked node.- Nodes can be selected by a single click. If you want to select multiple nodes, you can press and
hold
Ctrland click, or you can use area selection. - You can copy or cut nodes using
Ctrl-CandCtrl-X. PressCtrl-Vto paste current copy. The copy will apper in the middle of the screen. - To delete selected nodes press
Deletekey. - Side panel contains
Structuretab. The entire workspace tree is displayed there. The root node in the tree is the root of the workspace. You can select nodes in the structure, or double click them to navigate to them. - If you change the size of side panel, you can see
PropertiesandStructuretabs side by side. TextValuenodes have a few custom properties:readonly,wrapandinline. You can read more about their functions by pressing the information icon inTextValuesection of node properties.