TBC Macros and Extensions

 View Only

 June 2024 Installation for Macros

Jump to Best Answer
Justin Rengert's profile image
Justin Rengert posted 06-07-2024 19:33

Hello,

I'm looking forward to creating Macros for TBC.  I'm having trouble getting to a starting point.  I'm hoping that this post will help me and others to get started.  I installed Visual Studio 2019 (Is there a link to Visual Studio Community 2019?).  I installed Iron Python (IronPython-3.4.1) and trimble_macros_sdk_v2024.00.msi.  I have Trimble Business Center 5.91 64-bit installed.  

When I run Visual Studio, is something Trimble supposed to appear?  I tried copying MacroCommands.zip to the MacroCommands3 folder and a newly created MacroCommands folder.

Maybe I missed something somewhere?  Any help would be greatly appreciated! and Intellisense capability would make it easier to learn.  

Thanks,

Justin

Ronny Schneider's profile image
Ronny Schneider Best Answer

I copy and paste a few infos from my old post #2 (https://community.trimble.com/communities/community-homepage/digestviewer/viewthread?GroupId=415&MessageKey=4fa77769-d955-4525-80ff-daca0707c274&CommunityKey=8a262af4-a35e-4e9a-9dd3-191cc785899a)

But it's worth to read to other comments in that thread as awell.

You should nearly have everything you need.
In theory you should copy the ZIP-File from "C:\Program Files (x86)\Trimble\Macros SDK\Templates\2019" to
"C:\Users\your user path\Documents\Visual Studio 2019\Templates\ProjectTemplates".

The video in that post is for TBC prior to 5.90. All the path's you see there relate to the old macro location "C:\ProgramData\Trimble\MacroCommands".

From TBC 5.90 onwards you replace those with "C:\ProgramData\Trimble\MacroCommands3"

I haven't tested the latest template since I never use it again. I'm using one single Visual Studio "Solution" with subfolders for each macro. Creating a new macro in my setup is creating a new folder and manual copying/renaming another macro into it.

Here a link to my Dropbox. It contains some basic training videos with a sample Visual Studio solution/macros.

https://www.dropbox.com/scl/fo/7j7skk1rou5ixjjqm216x/AKXgwLyfxRc2nVHrPdgfaZY?rlkey=7ghdt7c7a3gvzjwm3ksynzmbi&st=sjifnp5q&dl=0

I've created those training macros prior to TBC5.90, but I just tested them, and they still work in 2024 without changing any imports. You just need to copy them to the new location instead, "C:\ProgramData\Trimble\MacroCommands3"

Bryce Haire's profile image
Bryce Haire

Hi Justin,

Welcome to TBC Macros Community. 
Please follow the threads posted in the "Library" section of the community. This should walk you through the setup for getting your environment ready as well as creating your first Macro. 

https://community.trimble.com/communities/community-homepage/librarydocuments?communitykey=8a262af4-a35e-4e9a-9dd3-191cc785899a&LibraryFolderKey=&DefaultView=

 Glad to you have interested in developing macros!

EDIT

Please see Ronny's post. It appears some of the tutorials are a little dated and I'll make note of that for our side to get updates into our training materials!  

Fernando Calvo's profile image
Fernando Calvo

Ronny,

you are simply amazing ! I didn´t know that you created those videos but they are great ! This is exactly what we would have needed many years ago when we started with TML macros without any documentation...

Exactly this is what a manufacturer must offer to the developer community as we help them to sell much more software and hardware, so it would be the minimum, as we know from other development environments such us for AutoCAD, Civil 3D, Revit, SketchUp, etc, but anyway, you did their job (again) and we all really appreciate it and for the new developers, probably you don´t know yet, but Ronny just saved you months and months of trial-error and self trying, and a lot of frustration  !

So in the name of the whole community BIG THANK YOU Ronny!

Regards,

Fernando

Justin Rengert's profile image
Justin Rengert

Thanks Ronny and others!  I tried a number of changes at once, so I'm not sure what exactly worked, but now tbcMacros shows up as a template.  I will look into previous posts this weekend, but I think the only problem left is setting MacroCommands3 to not be read-only.  It seems to be set for all users, but not the creator owner. 

I would like to point out that when you are creating a new project, you should make sure NOT to have a filter for new projects by 'Python', apparently Iron Python is something different.  This kept me from even seeing tbcMacros, if it was there.

At this time, a google search for "web archive visual studio 2019" will get you to the awesome archive.org and a link for VS2019 download.  I was also impressed that VS2019 was able to install the latest update.

Thanks again,

Justin

Ronny Schneider's profile image
Ronny Schneider

It should be enough if you set "Users" to have "Full Control" (Modify, Read/Write etc.)

On my machine "Creator Owner" shows none of them and even my own name doesn't, but "Users" does which means everybody that uses the computer.

That is one of the most annoying things Trimble came up with, with the change to IronPython 3.

In the beginning it worked if you created the folder manual with your own account, since that meant you were the owner. Nowadays that has changed and any rights you may have had over that folder are taken from you with every TBC installation and IT needs to revoke it every time again. I really would like to meet the responsible people who supposedly forced Trimble into doing that nonsense.