TBC Macros and Extensions

 View Only
Expand all | Collapse all

Creating custom reports with TBC macro

  • 1.  Creating custom reports with TBC macro

    Posted 09-08-2020 00:29

    Hello,

     

    Im looking for a way to create a way of presenting and exporting custom (surface-surface volue)reports. Im thinking it might be possible to create something with TBC macros. But im having problems understanding how i can solve this. I have tried looking in the "object browser". I tried to find a "test" macro with similar functionality but found none.

     

    Does anyone want to share an easy example on how to create customer reports?  

    Or explain how you would go on when trying to solve this.

     

    Thank you!



  • 2.  Re: Creating custom reports with TBC macro

    Posted 09-11-2020 03:41

    error in text above. customer == custom *

     

    Also, is there a way to perform a surface to surface volume calculation. If so what trimble library(dll) should i add to "object browser" in order to search and read about it?

     

    One more thing i forgott to ask is if i can find out how a specific class looks? For example how StackPanel class looks?

     

    Thank you



  • 3.  Re: Creating custom reports with TBC macro

    Posted 11-16-2020 17:42

    Create a "report":

    I think one of the sample TMLs does an export to an Excel file, or at least a comma-separated-value (CSV) file.  That's probably the simplest way to create a "report".  Back in the day, all reports had a "viewer" option (it had Save-As options like PDF, Word?, and Excel - which was sometimes funky what it created) and once and a while, a report would have a specific export to Excel version.  But later on, some of the construction reports just had a simple Excel option because users could easily manipulate it on their own and use it with other software.

     

    Surface-to-surface volume calculation:

    You might try looking in Trimble.Vce.Gem.dll - this has the surface generation engine and I think the Model3D entity, which is the base surface entity that all surfaces are based upon.

     

    How UI looks:

    The UI framework used by the TML samples, that plugs into the Python code directly, is WPF.  So you can search online for WPF samples to see how different WPF controls look/work.  I'm guessing that the majority of TML needs can be handled by basic WPF controls and the TBC controls - i.e. a StackPanel with labels and controls.  If you want fancier UI, WPF is pretty powerful - you can search for WPF tutorials (you may have to convert C# into IronPython yourself, since most examples will probably be in C#, and how WPF xml binds to the IronPython is a little bit different)

     

    I know it's a lot to take in, but hope that helps some.

     

    Quan

    Revenant Solutions | Trimble Community

    Independent TML Development - Build. Share. Grow.