Copy and Paste between Drawings or Tables

We can copy and paste objects between drawings and tables using the usual mouse moves and keyboard shortcuts to select objects or records, and then use the usual Windows keyboard short cuts (Ctrl-C, Ctrl-V) to copy selected objects or records and paste them into a destination drawing or table.   The usual menu choices, such as Edit-Copy and Edit-Paste also work.


When copying and pasting objects in drawings, we can copy from a drawing and paste into another drawing, copy from a drawing and paste into a table that has a geom field, copy from a table that has a geom field and paste into a drawing or vice versa in any of those combinations. We can also copy objects from a drawing and then paste into the Project pane to create a new table that has the pasted records, complete with geometry.   Manifold will automatically re-project coordinate systems that are used by different drawings and geoms so pasted objects are re-projected into the destination coordinate system.


Copy objects from one drawing or table and paste them into a different drawing or table:


  1. Select desired objects in a source drawing, or select the records for those objects in the source drawing's table.

  2. Choose Edit - Copy in the main menu or press Ctrl-C  to copy those objects to the Windows clipboard.

  3. Click the destination drawing window or table window to move the focus to that drawing or table.

  4. Choose Edit - Paste in the main menu or press Ctrl-V to paste the objects.


If all field names match between source and destination and data types are compatible, Manifold will automatically match field names and do conversions between compatible data types.


If there is a mismatch in field names or data types between source and destinations, Manifold will raise a Paste dialog allowing us to choose how fields will be pasted.  If we want to force use of the Paste dialog, we can paste with a Shift-Ctrl-V.


We can also create a new table in the Project pane by pasting records or objects copied or cut from a table, a drawing or a drawing layer in a map window.  Copying records from a table or objects from a drawing and then pasting into the Project pane creates a table that is the same name, with an added number to iterate the name, as the source table or drawing's table.


Drawings and tables that participate in copy and paste must have been correctly imported or created, and ready to participate in editing, for example, allowing selection in source drawings:



Pasting with Ctrl-V or  Edit - Paste automatically matches field names from the source drawing or table to the destination drawing or table, automatically iterating mfd_id values to avoid collisions between pasted records from the source table that originally had the same mfd_id value as existing records do in the destination table.    If field names do not match, the Paste dialog will automatically be launched.


Pasting with Shift-Ctrl-V calls up the Paste dialog even if all field names match.  To control how fields are pasted using the Paste dialog, in the Paste dialog click into a cell in the right-hand column and choose options or field names from the pull down menu.   


For example, in the Paste dialog,  click into a cell in the right-hand column and in the pull down menu choose ignore Field to paste NULL values into that field for any pasted objects or records.  Choosing ignore Field for the special mfd_id field will automatically create new, unique mfd_id values, avoiding any collisions in mfd_id values with existing records.  The pull down menu will also allow us to map different source fields into destination fields.


Pasting records will use the table field style for each field that is used by the destination table.


Keyboard Shortcuts


Select All


Deselect All


Select Inverse








Paste launching the Paste dialog




Tutorial Example

We will copy and paste between drawings that appear in two different maps.   Both maps have a background layer taken from the Canvas dark gray web server that is available in the ArcGIS REST collection published as a .map in the Product Downloads page and used as a demo in the Manifold Viewer Introduction video.



Our Destination Map contains an empty drawing called Destination.   In this example we will copy objects from a different drawing and then paste them into the Destination drawing.   



With the focus on the Destination Map window we see the map uses the usual Pseudo-Mercator default coordinate system, as does the Destination drawing.  



The Destination drawing is empty, as we can see from the drawing's table above.   The table contains only two fields, the usual mfd_id key field, and a geometry field named Geom in the usual, default Manifold style.


Our source drawing is in a different map called Provinces Map.   This map also uses a Canvas dark gray web server layer to provide visual context.



The Provinces Map has the Provinces drawing as a layer.   The Provinces drawing shows administrative subdivisions taken from OSM maps for France, Germany, Poland, Lithuania and Latvia.   These have been colored using Style so provinces for different countries have different fill colors.



With the focus on Provinces Map we can see from the Component pane's readout that Provinces Map is in the usual Pseudo-Mercator coordinate system.   However, the Provinces drawing is in GCS_WGS_1984, which is another name for Latitude / Longitude, and the name used by Natural Earth, from which the provinces layer was originally imported.  The map window re-projects the Provinces drawing on the fly into Pseudo-Mercator for display purposes so it correctly lines up with the projection used by the map window.



In the Provinces Table we see that in addition to the usual mfd_id identity field and Geom geometry fields, the table has fields that give the country code using ISO standards, a name for each province and the name of the country.     As with every DBMS, rows in tables in Manifold are not ordered.    If we would like to order rows in tables we can ctrl-click column headers to sort by columns, or use other techniques (such as an ORDER BY query in SQL) to generate whatever ordered view we want.

Copy and Paste

We will now copy some objects from the Provinces drawing and paste them into the Destination drawing.  



In the Provinces drawing, Ctrl-click onto three of the German provinces to select them.   They will appear in red selection color.



The same provinces are also selected (of course) in the table and likewise appear in red selection color.    We have ctrl-clicked the iso_a2 column head in the illustration above, to sort the table by country code.  That allows a view which shows all three selected records in the same small view.


If we wanted, we could have ctrl-clicked the records in the table to select them, and the corresponding objects in the map would also be selected.  


With the focus either on the Provinces layer in the map window or on the Provinces Table window, choose Edit - Copy in the main menu or press Ctrl-C on the keyboard.  The same objects/records are selected in both the map window and the table window, so it doesn't matter which has the focus when we command a Copy.   Selected objects in the drawing and their corresponding selected records in the table are the same things, just displayed in different ways.  



We click onto the Destination Map to move the focus there, with the Destination layer the active layer.   We press Ctrl-V.  



Instantly, the three provinces are pasted into the drawing.   We have previously used Style to set the fill color for the Destination drawing to yellow, so the provinces appear using that style.



Three new records appear in the table, corresponding to the three new objects that we see in the Destination drawing.  Manifold has automatically re-projected the geometry info in the Geom field from the source Latitude / Longitude coordinate system used in the Provinces drawing's Geom field into the Pseudo-Mercator coordinate system used in the Destination drawing's Geom field.


The above is an example of a simple paste.  The destination drawing has only an mfd_id field and a geometry field, with the geometry field using exactly the same name, Geom, as the source geometry field.  There are no other fields in the destination drawing/table to accept any other attributes, so there are no decisions to make regarding how other attributes should be copied.   When we pressed Ctrl-V it was clear to Manifold we wanted to paste the objects with no options required so that is what was done.

Copy and Paste with Attributes

When the source and destination drawings have multiple fields, Manifold will raise a dialog to resolve any ambiguities.   Let us repeat the above copy and paste, but this time we will paste into a different drawing that has fields in addition to the mfd_id field and Geom field.



In the illustration above we have removed the Destination drawing from the map and instead have dropped a different drawing, Countries, into the map as a layer. The Countries drawing uses default, Pseudo-Mercator projection.  We have also zoomed closer into the view.



The Countries drawing's table has Country and Province fields, both nvarchar Unicode text fields, in addition to the mfd_id and Geom fields.    These are different names than are used for fields in the Provinces drawing's table.



For a change of pace, we will copy the three provinces from the table instead of from the drawing.   With the focus on the open Provinces Table, we press Ctrl-C to copy the selected three provinces.  We could also choose Edit - Copy from the main menu, if we prefer menu commands to keyboard shortcuts.



Clicking on the Destination Map window to move the focus there, with the Countries layer as the active layer, we paste the copied provinces with a Ctrl-V into the Countries layer.   We could also choose Edit - Paste from the main menu, if we prefer menu commands to keyboard shortcuts.



This time, because fields in the source and destination drawings or tables do not match, Manifold pops open a Paste dialog to allow us to specify how we want the fields to be pasted.  


On the left are the destination fields and on the right are the source fields.   The Geom fields use the same name in both tables so Manifold guesses we want the Geom field from the Provinces table to be pasted into the Geom field for the Countries table.   To specify the other fields, we click into the source cell.



In the pull-down menu, we choose the field desired.



  For example, we want the name field from the Provinces table to be pasted into the Province field in the Countries table.



We repeat the procedure to choose the admin field from the Provinces table to be pasted into the Country field in the Countries table.  


Press OK.



Three new provinces appear in the Countries layer.   We have used Style to specify a blue fill color for areas in the Countries drawing.



Three new records appear in the table.    Comparing the source table to the destination table we can see how values for fields have been assigned based on the choices we made in the Paste dialog.



Although the illustrations above do not show data types, the text fields in the Provinces table are all nvarchar text.    Manifold will automatically convert between varchar and nvarchar text types when pasting.   That is a good reason to always use nvarchar as default, since Unicode text cannot be correctly represented in varchar text types.   Converting from Unicode nvarchar to varchar can result in some strange characters appearing.

Automatic Matching of Field Names

As much as possible, Manifold by default will match field names.



In the above map we have removed the Countries layer and instead have dropped a drawing called ISO into the map as a layer.



The ISO table shows the drawing is empty, but the table uses field names where four out of five field names are the same as in the Provinces table.



With the focus on the open Provinces Table, we press Ctrl-C to copy the selected three provinces.



Clicking on the open ISO Table window to move the focus there, we Ctrl-V into ISO Table (or, into the ISO layer in the map), Manifold will raise the Paste dialog again.




Two of the field names are the same in both tables, so Manifold will assign source fields to the same named destination fields.   We click into the source field cell location for the geometry field, and choose the Geom field as the source.



We do not have any fields in the source Provinces Table we would like to assign to the class field, so we accept the above arrangement.


Press OK.



Three new records appear in the table.   Since we did not paste anything into the class field, that field has NULL for each record.



Three new, corresponding objects appear in the drawing.   We have used Style to apply a green fill color to the ISO drawing.


Manifold will automatically paste without raising a Paste dialog when all of the field names match up.    That can be a problem when the names of fields match up, but the same name is used to mean different things in a different drawing.   



Consider the drawing layer above, called Oops.    It already has two objects in it, showing provinces in Germany.



In the Oops drawing's table we see it has fields that are named the same as in the Provinces Table, but using different meanings.   For example, for a country code that the Provinces drawing calls iso_a2 the Oops drawing uses a field name called name.    But the Provinces drawing uses name for the names of provinces.



If we copy our three selected objects/records from Provinces and paste them into the Oops drawing, Manifold will automatically match field names and will silently paste three additional records in the table and objects in the drawing.



By automatically matching the contents of the name field in Provinces to the name field in Oops, the result is incorrect, putting a province name into what should be the code for the country.


We can avoid that problem by pressing Shift-Ctrl-V to paste, either in the Oops drawing layer in the map or in the Oops Table window:



Pressing Shift-Ctrl-V is a command to Manifold to open the Paste dialog so we can explicitly specify or confirm what Manifold has guessed about which fields should match up.



The Paste  dialog opens with the name field from the source to be pasted into the name field for the destination.  That is not what we want.   We can change that by clicking into the name field for the source and changing it to iso_a2.



We then press OK.



Three new records are created, this time using the correct paste of country codes from the iso_a2 field from Provinces into the name field of Oops



Three new objects appear in the drawing as well.

Paste a New Table

So far we have looked at copying and pasting between drawings and tables.   We can also copy objects from a drawing or records from a table and paste into the Project pane, to create a new table.



Above we see the Project pane for the various components we have used in this topic.    The Provinces drawing shown in the Provinces Map is drawn using data in the Provinces Table.



With the focus on the Provinces drawing tab in the open map window, we have three provinces in Germany still selected.  We Copy them with a Ctrl-C.



In the Project pane, we right-click into the blank area below the components list and we choose Paste from the context menu.    A new table, called Provinces Table 2, appears in the Project pane.


When we paste a new table, by default the new table is named the same, with a number added to iterate the name, as the source table from which the data was copied, either the drawing's table if we copy from a drawing or the source table if we copy from a table.  In this case, the Provinces drawing's table is the Provinces Table, so the new table created by pasting is called Provinces Table 2.


We double-click the new Provinces Table 2 to open it.



The new table has exactly the same schema, including all fields and indices, as the source table.   It is populated with the three records that we copied, and then pasted to create the new table.


The iterated name is not usefully descriptive, so we take a moment in the Project pane to rename the table to Three Provinces Table.



If our interest is only to copy records from a table and to paste them into the Project pane to create a new table, we are done.   However, since we have copied objects from a drawing and pasted them to create a new table, we might be interested in creating a drawing from the new table.    That is easy.


In the Project pane, we right-click on the Three Provinces Table component and in the context menu we choose Create - New Drawing, to launch the New Drawing dialog.



We enter Three Provinces as the name of the new drawing.   The dialog shows the coordinate system in red provisional color, to alert us that we must specify the coordinate system to use for the geometry.   


 We click the coordinate system button, and either choose Latitude / Longitude or, if we have saved it as a Favorite, the GCS_WGS_1984 name for the same thing.



Press Create Drawing.



A new drawing called Three Provinces appears in the Project pane.   We can drag and drop it into the map.



We see that the three provinces contained in the new table we pasted are indeed the three provinces we copied.   They appear in default, gray style.



A few moments with the Style pane and we can provide a sharper appearance.  In the view above we have zoomed in for a better look at the three provinces.  



Paste is always Paste Append -  If we have objects or records selected in the destination, the paste will ignore them and will simply add new objects and records.   Therefore, if we want to replace very similar objects with new versions of those objects copied from a different drawing, we should delete the old versions first.   Otherwise, when we paste the new objects they may appear in exactly the same place as the old objects.   Having two very similar objects in the same place can be very confusing.


Merge Drawings - A quick way to combine many drawings is to use the Merge Drawings command.


Use Background Maps - When pasting into a totally blank drawing it is easy to get confused if objects happen to be pasted out of sight of whatever is the current viewport.  Yes, we can zoom to fit but it may be better to avoid any confusion by working with drawings as layers in maps where there is a background layer, like the Canvas world map background layer used in illustrations above, to provide immediate visual context.


Must we use the name Destination for drawings into which we Paste?  - No.  We can paste into drawings or tables of whatever name we like.   The name "Destination" as used in this example has no special meaning.   It is intended merely to help readers keep track of what is going on.   We could have called it "Alice."


See Also

Getting Started


User Interface Basics






Layers Pane


Info Pane


Example: Draw Lines, Areas and Points - Simple example of using basic mouse moves to add points, lines and areas to a drawing.


Example: Drawings use Geom Fields in Tables  - An essential discussion on how drawings are created from geom fields in tables, including how the drawing knows which coordinate system to use.



Manifold 9 - Copy and Paste Part 1 - The latest builds add seamless copy and paste between drawings, maps and tables. We copy objects from one drawing and paste them into another. Manifold automatically re-projects copied objects from whatever coordinate system the source uses into the coordinate system of the destination. Manifold even re-projects on the fly multiple, different geometries. We can either let Manifold paste automatically or choose options.


Manifold 9 - Copy and Paste Part 2 - We continue with our look at copy and paste, this time looking at how we can paste using different names for attribute fields. When Manifold can match up attribute fields by name the system will do so, but if we want to use differently-named fields that's easy to do also, as this video shows.