Example: Create a Line using the Info Pane

In this example we create a line in a drawing using the Coordinates tab of the Info pane.    This is a somewhat artificial example in that most editing happens in the map window, not in the Info pane.  However, by exploring how to edit coordinates in the Info pane as a part of creating a new line, we can see how to use the Info pane when that suits our purpose.


We begin with a new, blank drawing.  We  right-click into the Project pane and choose New Drawing and then we double-click on that new drawing to open it in a window.



 As described in the Editing Drawings topic, we choose Create Line for the mode button in the main toolbar.



In the drawing we click three times to mark three vertices for the drawing.  We have snapping turned on to snap to grid, with grid spacing of an even 1 unit.   That will make coordinates whole numbers.  


To see the coordinates, click on the Coordinates tab in the Info pane.  



The coordinates of the vertices appear in the Coordinates tab.   The coordinates are shown in blue preview color since the line has not yet been committed.  Even though the line is still in the process of being created, we can click on one of the coordinates rows to edit the location of a vertex that has already been clicked.   We click on the second row.



That moves the row cursor onto that row.



In the drawing, the corresponding vertex is marked as picked for editing.



Back in the Coordinates tab, we can Double-click onto one of the coordinates to edit that coordinate.



We will change the Y coordinate for that vertex from 129 to 185.    Press Enter.



Right away, in the drawing the vertex moves upwards from the position using a Y coordinate of 129 to the position using a Y coordinate of 185.  


If we like, we can add a new vertex immediately after the selected vertex using a simple trick.  When adding vertices to create a line, we are working in Insert Coordinates mode.   Coordinates that we click are added to the end of the line.   We can change that by first switching into object editing mode, like that used for editing existing objects, clicking on the vertex we want to be the active vertex, and then switching back to Insert Coordinates mode, which will then start taking effect, adding vertices with each click, being immediately created just after the active vertex.


Our workflow to do that, continuing with our example:


We click onto the drawing's tab or title bar to move the focus to the drawing, and then in the keyboard, we press the M key, the keyboard shortcut for Move Coordinates mode, the default editing mode to alter existing objects.  If we prefer to choose from a context menu instead of using keyboard shortcuts, we can instead right-click into the drawing and choose Move Coordinates from the context menu.



In Move Coordinates mode, the line no longer rubber-bands to the mouse cursor for insertion of a vertex at the next click.   The vertex we moved by editing a value in the Coordinates list is still the active vertex, since we have not clicked on a different vertex or edited a different row.


Next, we press the I key, the keyboard shortcut for Insert Coordinates mode, the default editing mode to alter existing objects.  If we prefer to choose from a context menu instead of using keyboard shortcuts, we can instead right-click into the drawing and choose Insert Coordinates from the context menu.



That switches the object back into Insert Coordinates mode, which restarts following whatever was the active vertex, rubber-banding segments to the mouse cursor and ready to create a new vertex wherever we click.



In the Coordinates list, a new row appears below the row we edited, which was the row for the active vertex.  



We click at the indicated position to insert a new vertex.



A new vertex appears where we clicked, and the line's segments rubber-band to follow the mouse cursor, ready for the next click.



In the Coordinates tab a new vertex row has appeared and the insert row has moved down one position.



In the drawing we can click at the indicated position to insert another new vertex.



The drawing line segments will "rubber band" to follow the mouse cursor.   We click one more time.  


We will now click the Add Record button in the Coordinates tab.



Clicking the Add Record button has the same effect as right-clicking in the drawing and choosing Save Changes: it commits the creation of the new line, which up to now has simply been previewed in blue preview color.   We can also commit changes with a Ctrl-Enter.     If we want to abandon the creation of the new line, we can press Ctrl-Backspace or right-click and choosing Undo Changes.



That creates a new line.

Editing a Line

We can continue this example by editing the line we just created.



We begin by clicking the default mouse mode to get out of line creation mode.



Next, to pick the line for editing we Alt-click it, which shows attributes in the Info pane Values tab.  


To change the shape of the line by moving coordinates about, we enter Move Coordinates mode: we can do that by clicking any vertex or segment in the picked line, or by clicking the Coordinates tab, or by right-clicking into the drawing and choosing Move Coordinates in the context menu.



In Move Coordinates mode, the line appears in blue provisional color, marked with larger boxes at the vertices, with an extra-large box marking the active vertex.



The Info pane automatically opens to the Coordinates tab.  The row cursor is on active vertex row, by default the first vertex row, corresponding to the vertex that is marked with an extra-large box.


We can make any vertex the active vertex by clicking on it in the drawing, or by clicking the row for the desired vertex in the Coordinates list.



We Click on the row for the third vertex.  That moves the row cursor to that vertex row.



In the drawing the third vertex is now marked with the larger, enabled-for-editing box.   We can drag that vertex to a different position.



As we drag the vertex to a new location the blue preview lines showing the proposed new shape of the line will rubber-band to follow the moved vertex.  Current line segments remain shown in black.



Releasing the drag motion, the vertex appears in the new location in blue preview color.



The new coordinates of the vertex are shown in the Coordinates tab in blue preview color.   To commit the change, we can press the Update Record button or right click in the drawing and choose Save Changes.  We can also press Ctrl-Enter as a keyboard shortcut.



The line appears in the new configuration, still chosen for use in the Info pane.   To un-pick that line we can Alt-click anywhere outside the line.



That shows the line in final, edited appearance.


Zillions of digits after the decimal point - Why are the coordinate numbers in some illustrations relatively short numbers like 199 or 177 but sometimes when we try to repeat this example the numbers have many digits after the decimal point?   That depends upon the zoom level we use in the drawing, and also whether we use snapping to snap to round numbers using snap to grid.


If we create a new. blank drawing in the Project pane, open it and without zooming in or out begin adding new lines we are working at the default zoom level of a drawing when it opens.  We can get the same effect by first choosing View - Zoom to Native before we begin clicking to create objects.


At the default zoom level, every pixel on the screen occupies a more or less round number of units of measure in whatever coordinate system the drawing utilizes, so no matter where we click we click on a pixel at some reasonably round number of units of measure.     We might click at a coordinate location with numbers such as 199.5 or 177.5 but because we cannot click into a fraction of a pixel we cannot click at a location that has numbers such as 15.921622760800847 or -52.834836670179136.


In contrast, when we zoom in or out, especially if we use Zoom Box where Manifold will zoom not to some quantized zoom level but to whatever interpolated zoom we command, the coordinate numbers that each pixel represents could easily be some fraction that could extend with many digits past the decimal point.   


In fact, Manifold uses full accuracy at all times, even in the opening, default zoom level, but the system truncates endless strings of zeros so instead of showing numbers like 199.500000000000000 the dialogs simply show 199.5.    If we snap to a grid, and use grid steps of 1 or some other even number, then all clicks in editing will snap to the grid and numbers will be round numbers, as in this example.


How do we constrain our creation of objects so that we always click onto coordinates that are reasonably round numbers?   


The easiest, explicit way is to use snap modes and use Snap to Grid to snap to the virtual grid that can be turned on in the Layers pane.  Set the Step value for the grid to be some reasonable even number.  Adjust the Step value by double-clicking on the Grid virtual layer in the Layers pane, to launch the Grid dialog that is used to customize grid settings.


A Grid step value of 1, as used in this example, will limit mouse clicks to only those grid locations that are round numbers of the unit of measure, with no digits to the right of the decimal point.


See Also





Info Pane


Example: Create an Area with a Hole - Create an area in a drawing where the area includes one or more holes.  This is similar to how we create areas that have islands as part of the area.   


Example: Create an Area with Holes and Islands - Create an area in a drawing where the area includes holes and also islands.


Example: Create a Multipoint - How to create multipoints.  This topic provides two examples:  First we create a multipoint and then next we create a multipoint having two branches.  The purpose of this topic is to help teach the implementation of geometry in Manifold and other typical spatial packages using a somewhat unusual and rarely met object type, the multipoint, which combines what appear to be many separate points into a single multipoint object.


Example: Edit Coordinates While Creating an Object - When creating an object in a map using a tool such as Create Area, right in the middle of the process we can edit coordinates in the Info pane Coordinates tab.   This example shows the step by step process.


Example: Edit Attributes and Move a Point - We look at the attributes for a point in a drawing layer and edit one of the attributes using a more expanded Edit dialog.  We then move the point to a new location. Easy!


Example: Edit Attributes, Larger Text, IME for Asian Languages - A tour showing how to edit attributes in a drawing using the Info pane Values tab and the expanded Edit dialog, including advanced Unicode facilities and use of the built in Input Method Editor (IME) to input text in Japanese language.


Example: Add Vertices in the Middle of a Line being Created - During the creation of a new object we can go back and make corrections, additions and deletions to coordinates already marked.  In this example we start creating a new line, and then notice we have skipped over some locations we wanted to click.  We go back to add those vertices (coordinates), and then we continue with creating the line.