Recoloring Imported LandXML Lines Using Their Names

This question came in today - how do I recolor linework that I import using the LandXML importer to be a color that maps to the line names.

LandXML linework during import can be mapped to Layers using the Surface Name, The Line Name or the Line Description fields - you can choose that when you import the LandXML file using the Import command (note you don’t get this option with drag and drop - that uses the last used settings from the Import command. The usefulness of this all depends on the system that generates the LandXML file and also how that system is setup and configured. If you open the LandXML file with Microsoft XML Notepad or Notepad or another Text Editor (I use EM Editor) you can browse to the “Source Data” section of a Surface model and find the breaklines and then see how they are defined to determine whether or not you can layer information as you need it.

Failing that approach you can use the RPS Name by Layer / Layer by Name command that was recently updated to do this type of work.

Use the Layer by Name option, set up a Mapping File that Maps the Line Names to a Layer Group and have your Project template Setup with Layers in that Layer Group that have the same name as the line names / codes that you are using. Set each layer up with the color that you want. Run the command, pick the objects and pick the Map file and execute and all lines will be relayered and recolored to your requirements.

We don’t currently have an option to just Recolor by Name or to set hard coded colors on Lines - only to Relayer and if the sorce object lines are set to Color ByLayer this all works just fine.

Video shows how