We are coming from the same place, and no, what you see is what you get. Here are some recommendations:
- Have a look at my posts and the questions and answers related to them. Essentially you are going to create a DLL which you load with python. TBC will happily work as a debugger for both the py and cs files.
- Also search for Ronny Schneider on here. He is working exclusively in python but he has a big collection of macros on Git that will be of immense help. Ronny, when I do an @ mention there are 4 results. Are they all you?
- @Bryce Haire is also helpful. I believe he is with Trimble.
- Create a python project in VS2019 - you can probably get 2022 to work but believe me - climb one mountain at a time. There are walkthroughs on here that will get your dev environment working. The python project must be the startup project.
- You can either create your project in C:\ProgramData\Trimble\MacroCommands3\<MyCustomMacroFolder> or have a pre-debug script that compiles your DLL and copies the python folders and contents to the Macro3 directory. I don't know the python dev environment well enough to get it to do that, so I develop in the Macro3 directory. You will have to build you DLL before debugging or figure out how to do it as part of the debug process.
- Create a folder for each macro in your python project. You will have an image file for the icon, the py file and the xaml file in each one. Ronny has a post on best practices here.
- Add a C# Class Library project using Framework 4.8 to the project
- Your xaml file will also be loaded as a loose file (as above). Don't put any xaml in your DLL
Here is a little sample
# the name of this class must match name from cmdData.UIForm (above)
class MyProjectProperties(Window): # this inherits from the WPF Window control
# constructor
def __init__(self, currentProject, macroFileFolder):
# import the C# library
clr.AddReferenceToFileAndPath("C:\\ProgramData\\Trimble\\MacroCommands3\\MyMacros\\MyMacroLib.dll")
# load the view
with StreamReader(macroFileFolder + r"\MyProjectProperties.xaml") as s:
wpf.LoadComponent(self, s)
# configure the macro
self.currentProject = currentProject
self.macroFileFolder = macroFileFolder
# create the view model
from Db.Tbc import MyProjectProperties
prop=MyProjectProperties(self.currentProject)
# set view model properties
prop.SupportTransactions = False
prop.SupportPointManager = True
prop.SupportFeatureCodeManager = False
prop.SupportUiEvents = False
prop.SupportUndo = True
# set the datacontext of the view to the view model
self.DataContext = prop
Most of your projects will use StackPanel, but this is a dialog. Note that you can do MVVM because we have a data context!
Also, I have a base class that abstracts out the contents of the try...catch...finally block so I can reuse code. It also has all the boilerplate for Transactions and some of the support snapins that your macros may need to access.
I have one top level class per macro that inherits from by base class, which inherits from ViewModelBase in Trimble.Sdk.UI. In the script I newed up the class, set some properties - often lots of properties - then set the data context of the xaml file to the class. You can also interact with the xaml from the python script. In that case you tend to marshal data in and out of the class quite a bit.
Because this is a dialog, I load the form like this
# show the properties dialog when the script is executed
def Execute(cmd, currentProject, macroFileFolder, parameters):
form = MyProjectProperties(currentProject, macroFileFolder).ShowDialog()
return
Lastly, for now, but certainly not least, load up your object explorer with a bunch of DLLs from the SDK. This is a good start, but unfortunately the hardest part of all is figuring out how to get to what you want.

------------------------------
David Brubacher
------------------------------
Original Message:
Sent: 03-19-2025 17:26
From: David Prontnicki
Subject: Updated Training Materials
Hello Everyone,
I am an established developer with years of C#, .NET, and WPF experience to name a few, creating plugins for Autodesk products as well as many others. I now have a need and desire to start developing plugins/macros for TBC. I am curious if there is any newer documentation or training materials anywhere, as the ones posted within the community are very dated and do not correlate with TBC 2024. I can't seem to even see how to load a compiled .dll into TBC. It is very unclear. Any help or direction to additional materials would be greatly appreciated. A very simple "Hello Word" walk through would be great. Like I said, even if I develop something it is unclear how to load it into TBC. An Autodesk equivalent to netload. Thank you in advance.
------------------------------
David Prontnicki
------------------------------