TBC Macros and Extensions

 View Only
Expand all | Collapse all

TML - Name by text #2

  • 1.  TML - Name by text #2

    Posted 09-16-2022 10:13
    Looking for a TML that does exactly what the existing Name by Text TML does, except it doesn't require that line to be closed. I'm trying to quickly name lines based on text that already exists adjacent to the line. Ideally I could just select the text and the line, and hit okay and it will add the content's of the text to the Name of the selected line.


    Justin Dolbey

  • 2.  RE: TML - Name by text #2

    Posted 09-19-2022 00:44
      |   view attached
    I quickly bodged something together.
    The main code is rather simple.
    l1 = self.linepicker.Entity
    t1 = self.textpicker.Entity
    l1.Name = t1.TextString
    The rest around it is just for error proofing, handling.

    Unzip somewhere into "C:\ProgramData\Trimble\MacroCommands" and restart TBC. Should pop up in tab Macros.

    Click on a line, then click on a text. The line will be renamed immediately, no clicking on Ok necessary. The focus will jump back to the line field afterwards for quick line, text, line, text, line, text ...... selection.

    Ronny Schneider


    SCR_LinenameFromText.zip   5 KB 1 version