TBC Macros and Extensions1

 View Only

08 Appendix/Reference Information 

05-01-2018 12:13

Tips

  • Start all your macro captions with a special character so they appear first in Trimble Business Center All Commands list in the Command pane (e.g., _My Macro)

  • Start all macro code with: “import clr”. This adds the .NET environment.

  • Know the name and assembly of classes you are working with

    a. clr.AddReference("Trimble.Vce.Geometry")b. from Trimble.Vce.Geometry import Point3D

  • Use the Object Browser to see classes and methods.

  • The path to the macro must match what TBC is looking for, so open the file directly from C:\ProgramData\Trimble\MacroCommands.

  • If needed, set breakpoints in macros in the same way as in as C#. F5, F9, F10 all work the same way. In VS, select Debug > New Breakpoint or press Ctrl + B.

  • In the debugger, you can see the current value of variables.

  • If you make a change to a macro (or its .xaml file), restart the command in Trimble Business Center to refresh it.

  • On command start, the current file’s Modify date is checked. If needed, the macro is ‘recompiled’.

  • Online WPF documentation is helpful (and required). See Resources.

     

Learning Resources

Return to the first topic: 01 Welcome to TBC Macros!

Statistics
0 Favorited
82 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.