Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthorMonsen
    • CommentTimeOct 1st 2017 edited
     

    Index

    1. List (Basic)
    2. Symbols Along (Intermediate)
    3. Fractalise (Intermediate)
    4. Edit Text (Basic)
    5. Link with Map/File (Intermediate)
    6. Offset (Intermediate)
    7. Measuring Tools (Basic)
    8. Change like draw tool (Basic)
    9. Modifiers (Intermediate)
    10. File Paths (Intermediate)
    11. Complex Shapes [Combine Path] (Intermediate)
    12. Complex Shapes [Multipoly] (Intermediate)
    13. Break (Intermediate)
    14. Map Notes (Basic)
    15. Coordinates (Intermediate)
    16. Macros (Advanced)
    17. Search Files for Text (Basic)
    18. Text Justification (Basic)
    19. Mirrored Polygons (Intermediate)
    20. Managing Drawing Tools (Intermediate)
    21. Named Views (Basic)
    22. Symbol Lookup Sheets (Intermediate)
    23. Symbol Catalog Settings (Advanced)
    24. Symbol Catalog Filters (Advanced)
    25. Symbol Control Points (Advanced)
    26. Define Symbol (Intermediate)
    27. Curves (Basic)
    28. Selections (Intermediate)
    29. Sort Symbols in Map (Basic)
    30. Extract Properties (Basic)
    31. Convert File (Basic)
    32. Get Extents (Advanced)
    33. Quick Move (Basic)
    34. Menu Editing (Advanced)
    35. Trace (Basic)
    36. Array Copy (Intermediate)
    37. Explode (Basic)
    38. Clipboard Copy (Basic)
    39. Rename & Reorder (Intermediate)

    CC3+ contains a huge amount of various commands and features. In this series, I plan to highlight some of these. There won't be any special progression to this series, and the command will be selected from the entire range, from the simple basic commands, to more advanced features intended for the more advanced users. Feel free to use this topic to discuss the command presented. If you have a command you wish to have showcased, feel free to request it, and it may get presented.
    This series is called the command of the week, but it could also explain a feature or effect. The explanations will tend to explain the technical parts of the command, and is intended to highlight the basics (and complexities) of the command, but won't be a detailed tutorial on how to use it. It is up to you to use it creatively in your maps.

    Week 39 - Rename & Reorder

    When working with symbol catalogs, names and ordering are important. You'll normally want your symbol to have a fitting name (as well as a unique name to avoid naming collision with other symbols that might be used in the same map), and you want the order of symbols to make sense, especially if you plan on taking advantage of symbol groups, which in addition to providing a collapsing group to keep the catalog window more organized, you can also use features like random selection from the group, or on the fly swapping between symbols in the group when you are placing them. There are commands in the Symbol Manager window to both rename symbols, as well as change the order of them, but these commands operate on single symbols at a time, and is a hassle when you wish to do major changes.
    To make this more efficient, CC3+ has a command to export the name of the symbols to a plain text file, which you can then open in any text editor to either rename OR reorder the symbols (Don't do both in one go). This also means that you can use an advanced text editor with good search/replace functionality to do advanced renaming, such as adding a specific suffix to all the symbols, clean up numbering or whatever you wish.

    Where to find them?

    Menu: Symbols -> Rename & Reorder -> Create symdef name file, Import reordered symdefs, Import renamed symdefs
    Command Line: SYMLST, SYMORDER, SYMRENAME

    How to use them

    The first thing to remember when using these features is that you can EITHER rename OR reorder your symbols using this method. If you need to do both, you MUST do it in two passes. Don't be tempted to fix that spelling mistake while you are reordering the symbols.

    Step 1:
    Open op the symbol catalog you wish to modify in the main map window (i.e. as a map, and not in the symbol catalog window). You can also open up a regular map if you just wish to change the symbol names in a map, for example to fix symbol name collisions.

    Step 2:
    When using these commands, the first thing you need to do is to export a text file containing your symbol names. This is done by using the 'Create symdef name file' command. You can save this file to any name you wish, but you should use the .LST file extension for this. This is the default extension provided by the save dialog, unless you override it. The extension makes life a bit easier, because when you try to import it again, those dialogs only list .LST files by default, so using this extension saves you a step later.
    You'll end up with a plain text file containing all the symbol names from the file opened in step 1 above.

    Step 3:
    Open your symbol list in any text editor. I prefer a text editor with some advanced capabilities, such as Notepad++, but plain old Notepad will also work. Note that since this file carries the extension .LST instead of the more usual .TXT extension used by text files, you can't just double click on it, you have to open your desired text editor first, and from there, use the 'Open' command of that program, browse to the symbol name file, and open it. You may also need to change the filter in the open dialog to have it display all files, and not just common text file types.

    Step 4:
    Edit your symbol list file in the text editor. As stressed above, it is important that you EITHER change the order of the lines OR rename the symbols, but NEVER do both in one pass since CC3+ won't be able to determine which lines belongs to which symbol in that case.
    Note that when renaming symbols, symbol names cannot be longer than 31 characters. CC3+ will automatically truncate names that are too long, but if you have multiple names all starting with the same 31 characters, they end up with the exact same name after being truncated, which will cause issues, so keep an eye on the length of the names.
    Also, never remove lines from the file. Even if you see a symbol in there you don't want, delete it from the Symbol Manager in CC3+, don't just remove it from the list file.
    I recommend you stick to normal English characters and number, spaces and simple punctuation (comma, full stop, brackets, dash, underscore). CC3+ does not support Unicode in Symbol names, so foreign characters and special symbols (like emoji) will not render and may theoretically cause issues.

    Step 5:
    Save your edited file. Usually, there is no reason not to save over the existing file, no need to save to a new file.

    Step 6:
    In CC3+, do either 'Import reordered symdefs' or 'Import renamed symdefs', depending on what you did. It is very important to select the appropriate option here though. If you select renamed when you really did reorder the symbols, you'll end up with a symbol catalog where all the symbols have the wrong names.

    Step 7:
    If you now need to do the other operation (for example doing reordering after you've just done a renaming), simply start again from step 2.

    Notes and Advanced TIps

    • When you need to do both rename and reorder, you don't need to export the list file twice. Just export it once, then do renaming, save it, import it as a rename file in CC3+, then continue working on the same file in your text editor, this time do the reordering, and then import this file into CC3+ again, this time as a reorder file. The reason this works is that exporting a new list file right after importing one will just produce an identical fiel to the one just imported anyway. Of course, it is important that you didn't do anything to the symbol catalog in the Symbol Manager in between, and that you continue working on the same .lst file all throughout, DON'T go back to the original export for the second pass.

    • If you need to manipulate many symbol catalogs, keep using the same .lst file, just overwrite it for each export. Most advanced text editors will detect that the file has been changed on disk, prompting you to open it. Saves you from manually opening it for each symbol catalog you process, as well as the risk of opening the wrong file.

    • The reason why it is important to only do rename OR reorder in each pass is that CC3+ needs to know how to apply the changed lines of text to the symbols. There are no hidden information in a text file that CC3+ can use to automatically assign the correct line to the correct symbol, so it needs to look at the the same content you can see in the text editor. When you tell it that you have reordered the symbols, CC3+ knows that the names in the file will match the existing symbols, so it just uses that to find the new ordering. Likewise, when you tell CC3+ to apply a rename, it knows that the order of the symbols are the same, so it just applies new names from the file in order. But if you have also done reordering in the file and tell CC3+ it is a rename, CC3+ won't have any way to detect this, so it will simply treat it as a rename operation, effectively swapping the names on the symbols. Likewise, if you have done renaming in a file you tell CC3+ is a reorder, it won't be able to match the symbol with an entry in the text file, causing the symbol to keep its old name, and appear at the end of the list.
    •  
      CommentAuthorDogtag
    • CommentTimeOct 1st 2017 edited
     
    Having renamed and reordered, literally, hundreds of symbol catalogs while updating the annuals, I can confirm: don't rename and reorder at the same time.

    It isn't pretty.  #-o
    •  
      CommentAuthorDogtag
    • CommentTimeOct 1st 2017 edited
     
    Also, as Monsen said, keep an eye on the length of the symbol names so you don't go over the limit.

    That's not pretty either.  :-<