Trimble Business Center

 View Only
Expand all | Collapse all

Macro TBC - how to run macro without manually switching on TBC

  • 1.  Macro TBC - how to run macro without manually switching on TBC

    Posted 01-14-2025 08:24
    Hello,
    I have a question, unfortunately I haven't found an answer, so if there is a thread on this somewhere, please send me a link.
     
    I wanted to ask, I create a macro for TBC and due to performance issues, TBC stops working and crashes. Is there any way to please run the macro backwards without having to turn on TBC. Alternatively, is there a way to re-run TBC via something or other means and invoke the macro without doing it manually.
     
    Thanks for the help

    Radim


    ------------------------------
    Radim Holub
    ------------------------------


  • 2.  RE: Macro TBC - how to run macro without manually switching on TBC

    Posted 01-14-2025 14:49

    I don't think there is a way to start a macro upon TBC startup. And if your macro is interacting with TBC, i.e. adding/changing entities to/in the project database you'll have to have TBC up and running.

    But I wouldn't worry about this, the problem is that your macro is crashing TBC. Performance issues may slow the processing down but shouldn't crash TBC. And if it's constantly crashing TBC I don't see a point of re-starting and re-crashing. So, from my point of view you've got a bug in your macro, probably an endless loop or the like.

    Are you using Visual Studio to debug the code during runtime? If yes, you could step through the code and investigate at what point exactly it's starting to fail and if the variable contents did make sense up until that point.

    What is the purpose of your macro? Can you upload your code here (.py and .xaml as ZIP) or send me a private message r.schneider.eu@gmail.com.

    Better to post macro questions in the macro forum. https://community.trimble.com/communities/community-homepage/digestviewer?communitykey=8a262af4-a35e-4e9a-9dd3-191cc785899a

    They'll show up in the TBC forum as well, but are kept a bit separate.



    ------------------------------
    Ronny Schneider
    ------------------------------



  • 3.  RE: Macro TBC - how to run macro without manually switching on TBC

    Posted 01-14-2025 23:08
    Thanks a lot for the message,
    I don't have a working macro at the moment. I'm just looking for a way to batch import a few hundred GB to units of TB of data from scanners (.tdx), so that no one has to manually sit at it and import each (.tdx) in turn.
     
    I wanted to create an extension where the input data (all of it) would be selected, and it would be loaded into the TBC sequentially. The problem is that with such an extreme amount of data, sometimes TBC crashes and I need to reload the data (.tdx) and delete duplicate files from the file database. That's why I wanted to automate this.
     
    However, I see the problem (and if I understand correctly) that the given macros can only be run from an active TBC. The moment the data was uploaded, for example overnight, it still wouldn't work, because the moment the TBC crashed, someone would have to manually turn on the TBC and start the macro again.
     
    Thanks for your time Ronny


    ------------------------------
    Radim Holub
    ------------------------------