Name by Layer / Layer by Name
Command Licensing and Default Menu Location
- The Name by Layer / Layer by Name command is part of the RPS Data Prep Toolbox
- The command is located on the Data Prep macros menu ribbon
- The command is located in the Modify menu group
Last Updated: April 2022
Command Description
This command with the April 2022 update now has two primary functions
- Use the selected object layer names to name the selected objects
- Use the selected object names to relayer and regroup the objects
The first option is useful to name line features prior to sending out to field systems like Siteworks or Earthworks or to file formats like KML or SHP in order to transfer the objects with names that can be reviewed when they are tapped or selected in products other than TBC.
The second option has been added so that you can separate named objects into separate layers and layer groups based on the object names. This was requested by survey teams doing a variety of work types like utility pick ups for relocates prior to construction, where the measured data can be of different quality e.g. Potholed data, GPR (Ground Penetrating Radar) data, Exposed Trench data or As Built Data or for different types of utility e.g. GAS, WATER, ELECTRIC, STORM, SANITARY, COMMUNICATIONS etc. where layering the data based on feature coding alone is difficult because the codes may be structured to include eg Quality, Utility Type, Material (PVC, STEEL, LEAD, COPPER), Size/Diameter etc. so all codes are different but have common elements that can be used for the Layer Grouping. With this tool you can now relayer the objects by matching codes but also regroup the layers based on a partial match of code to different layer groups.
This command also introduces some new custom controls that will be rolled out to all of our commands shortly that aid increased productivity and ease of use
- Layer Filter - The layer filter can be applied to Layer list pull downs to reduce the number of Layers displayed based on the filter criteria e.g.DES will find all layers with the character sequence DES in the layer name. The filter characters can be case sensitive or not. The layer filters also contain support for Takeoff Categories, an external file of predefined filters and your most recently used filters.
Layer filter characters can also be set to be case sensitive (upper case, lower case, case match) for even tighter control on the filtered layer list.
- Layer Group Filter - The layer group filter can be applied to Layer Group list pull downs to reduce the number of Layer Groups displayed based on the filter criteria e.g. Des will find all Layer Groups that have Des or DES in the name. Layer Group filter characters can also be set to be case sensitive (upper case, lower case, case match) for even tighter control on the filtered layer group list.
- File Browser - The File Browser control provides the ability to browse for a file e.g. a Mapping File and once located now allows you to edit the file - the file extension will be used to fire off the application associated with that extension e.g. a CSV file will open in Excel, a TXT file will open in Notepad etc. based on your Windows system settings for File Extension mapping
Command Interface Description
The Name by Layer / Layer by Name command dialog looks as follows
Name from Layer Mode (Tab 1)
This part of the command will name or rename selected lines with the name of the layer on which they currently reside. Imported CAD or Vectorized PDF linework will be unnamed. If you want to make the objects “smarter” for field users of the data using other systems like Siteworks or Earthworks or for use in products like Google Earth, naming the objects is a good first step. You can either use the layer name in it’s “raw” form or you can use the layer names to map your desired names to the layers of the objects i.e. an Object on the layer FG - Flow Line could be mapped to the name Flow Line using a mapping file.
Lines to modify:
Select the lines that you want to name using the layer of the objects as the basis for the name.
Assign layer color to selected lines checkbox:
When checked, the linework will be recolored to the specific color assigned to the layer on which it resides i.e. if the layer color is set to Red and the line color is set to ByLayer then the renamed line will now be colored Red not ByLayer.
If left unchecked, then the lines color will remain as it was set prior to the commands execution.
Assign layer linestyle to selected lines checkbox:
When checked, the linework will have their linestyles changed to the specific linestyle assigned to the layer on which it resides i.e. if the layer linestyle is set to Dashed and the line linestyle is set to ByLayer then the renamed line will now have the linestyle Dashed and not ByLayer.
If left unchecked, then the lines linestyle will remain as it was set prior to the commands execution.
Assign layer line weight to selected lines checkbox:
When checked, the linework will have their line weight changed to the specific line weight assigned to the layer on which it resides i.e. if the layer line weight is set to 1.0mm and the line line weight is set to ByLayer then the renamed line will now have the line weight 1.0mm and not ByLayer.
If left unchecked, then the lines lines line weight will remain as it was set prior to the commands execution.
Assign layer name to selected lines checkbox:
When checked, the linework will have their line name changed to the name of the layer on which they reside i.e. if the layer name is Storm Sewer then the renamed line will now have the name Storm Sewer. If you wish to only rename unnamed lines i.e. protect lines that are already named from being changed, you can check the Ignore lines with a name checkbox lower down in the dialog.
If left unchecked, then the lines line names will remain as they were prior to the commands execution.
Ignore lines with a name checkbox:
If lines that you select already have line names, you can elect to not rename those lines in this process by checking the check box.
Name mask:
Use {L} for layer name
Use {N} for current name
You can include Prefix and Suffix characters around these entries e.g. V1-{L} would prefix the Layer Name with V1- and then the layer Name e.g. for Layer Name GRDG-Swale you would get V1-GRDG-Swale etc.
You can extend the existing names of lines using this method also e.g. if you use a name mask V1-{N} all selected lines will be prefixed with V1-.
Add line label? checkbox:
If you check this checkbox, the command will find the center of each line selected and place a label showing the name of the object aligned to the line at that location. This function is only available when you are mapping the names using the layer names, not when you are using a mapping file.
If you check the check box, then you can define the Layer and text style for the labels that you are creating.
Note in the layer selector, you can now click the filter button to apply a layer name filter that gets applied to the list of layers to reduce the list making it shorter and easier to locate the layer that you require. The filter is applied dynamically and is searching for a character sequence match anywhere in the Layer Names.
Use mapping file option:
If you want to name the objects grouped by layer using a mapping file that defines the source layer name and the target object name, you can elect to do that there.
The mapping file name can have any name and any file name extension e.g. Name by Layer.txt
The mapping file will have the format Layer Name, Line Name on each line of the file
You can store the mapping file wherever you want on your computer. We recommend storing these mapping files in your RPS Settings folder to keep all of your settings files in one location.
If you click the Edit button next to the browse button once the mapping file has been selected, the file will be opened in the application associated with the file extension being used e.g. a CSV file will typically open in Excel and a TXT file will open in Notepad.
Here is a simple example file
If you enable the Use mapping file option, then you can browse your PC for the mapping file that you wish to use.
Apply
Executes the command and readies itself for a second execution.
OK
Executes the command and closes on completion.
Cancel
Closes the command without further execution.
Layer from Name Mode (Tab 2)
This part of the command allows you to relayer the selected objects e.g. Points and Lines based on the names of the objects. For example you have imported utility pick up data of varying types measured for the utility relocations needed for a project. The point and line objects may have been coded using the “Measure Codes” function in Trimble Access or Trimble Siteworks, and have common elements including for example
- Location Quality Indicator (As Built, GPR, Potholed, Open Trench etc.)
- Utility Type (Gas, Water, Electric, Comms, Storm, Sanitary etc.)
- Utility Material (PVC, Copper, Steel etc.)
- Utility Size (100mm, 200mm, 500mm etc)
code examples could then look as follows
ASBGASPVC100
ASBGASPVC200
ASBWATPVC150
GPRSTMCON1000
The feature coded data cannot be easily mapped to the Layers and Layer Groups required to separate the data to make it easy to manage in TBC or as an export back to client systems. You may want to Group the layers in TBC by any of the following
- Location Quality i.e. all Asbuilt pickups in the same layer group (regardless of the other properties)
- Utility Type i.e. all GAS pickups in the same Layer Group (regardless of the other properties)
- Material Type i.e. all Concrete or PVC pipes in the same layer group (regardless of other properties)
- Utility Size i.e. all pipes of diameter 100mm in the same layer group (regardless of other properties)
Note that you can run the command once to split the data by one method, and then run it again to further split the data within a single layer group by a different property of the name.
Select the Layer from name tab in the command
Objects to relayer:
Select the objects that you wish to relayer using the name of the objects. The selected objects will be listed in the Names table below as follows
Use the Options button to access the advanced selection methods like Advanced Select, Select by Elevation, Select by Layer, Select by Polygon etc.
Names Table:
The names table populates the names of all the selected objects. Note that unnamed objects will be selected and listed at the top of the table. For each object you can check or uncheck the checkbox at the start of the row in the table. You can group select using standard Shift and Click functionality. Unchecking a row or rows will stop those objects from being relayered and regrouped by this process. The split name field will be populated with the identified character match from the mapping file selected further down the dialog (see below). Clicking the header rows of the columns will change the sorting of the data in the names table.
Default Layer Group:
The default layer group will be used for all created layers that are not mapped to a specific layer group through the mapping table. You can select a Layer Group from the pull down list. You can use the Layer Group filter to reduce the Layer Group list by inputting a character string into the filter control e.g. entering Des will find all Layer Group names that include the character sequence Des in the layer group name. You can create a new Layer Group by clicking on the button. If you do not use a Mapping file, then all objects will be relayered to a layer that has the same name as the object, and all newly created layers will be placed in the default layer group.
Use mapping file checkbox:
Check this checkbox if you wish to use a mapping file to identify objects with specific names or partial names and relayer the objects and group them into specific layer groups defined by the mapping file. If you do not use a mapping file, then all selected objects will be mapped to a layer of the same name as the selected objects and the newly created layers will be placed in the default layer group.
Mapping Filename:
Use the browse button to select the mapping file that you wish to use for the conversion process. We recommend that you store the mapping files in the RPS Settings folder (defined within the RPS Settings command). For more details on the RPS Settings command - Click Here
If you click on the the selected mapping file will open in the application associated with the extension of the file selected. i.e. a csv file will typically open in Excel and a txt file in Notepad etc. so that you can review and edit the content of the mapping file.
The mapping file content looks as follows
Name,Layer Group,Starting Character (optional)
AS,00-As-Built
IL,00-Ideal Location
VC,00-Venture Capital
sh,00-Sharpy,13
SC,00-South Carolina
ON,00-Ontario
NC,00-North Carolina
A2,00-A2 Group
C2,00-C2 Group
ST,00-Starter
The first row is a header row that defines the structure of the file.
All other rows are mapping rows and influence the mapping process for the data conversion.
Each row has a minimum of two data fields and an optional third field. The fields are separated with commas.
The first data field is the string of characters that you want to search for in the names of the objects to find a match that will drive the layer grouping process. Typing e.g. ASB in this field will search for the character sequence ASB in the select object names. The characters can be either anywhere in the name or can start at a specific character number in the name (see below).
The second data field is the Layer Group into which the created layer will be placed during processing. Note that the Layer Group does not have to exist in the project, it will be created if absent automatically.
The third optional data field is the starting character field. This defines the character of the object names at which to start the search for the match.
- If the string of characters is ASB and you put a starting character of 13 then the processor is looking in characters 13,14 and 15 of the object names for a match.
- If the string of characters is ASB and you put a starting character of -3 then the processor is looking at the third character from the end and the two subsequent characters of the object names for a match. Note using ASB and -2 would result in a failure to process as no match can be found.
- If no starting character is defined, the processor can look anywhere in the object name for a match of successive characters to the string defined in the mapping table.
Be aware of creating possible ambiguities through use of e.g. a single character in any character position as there will be many matches found. In these situations the closest match and then first match will be used to define the Layer Group.
If there are unnamed objects in the list, they will not be processed unless a specific instruction is found in the mapping table that looks as follows
Unnamed, Layer Group Name where layer group name is the target layer group for unnamed features. Unnamed will be used to also name those selected objects.
Apply
Executes the command and readies itself for a second execution.
OK
Executes the command and closes on completion.
Cancel
Closes the command without further execution.
Video Demonstrations
The following video shows how to utilize the Name by Layer functions of the command
The following video shows how to use the Layer by Name functions of the command
Example Mapping File - Name by Layer
Name by Layer.txt (556 Bytes)
Example Mapping File - Layer by Name
Relayer by Name (Char13 and 14).txt (217 Bytes)
Use Case Videos
The following videos show the use of the Name by Layer command in a work process context. It also highlights some new licensed features of the command for advanced data prep users.
***
Feedback and Enhancement Requests
If you would like to provide feedback on the use of the Name by Layer / Lsyer by Name command or to request enhancements or improvements to the command please click Reply below