08 Appendix/Reference Information

Document created by David Kosakowski on May 1, 2018Last modified by Gary Lantaff on Oct 17, 2018
Version 5Show Document
  • View in full screen mode

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!

Attachments

    Outcomes