TBC Macros and Extensions1

 View Only

02 Setting Up an Integrated Development Environment (IDE) 

05-01-2018 11:54

Installing IronPython

  1. Download the latest version of IronPython from http://ironpython.NET/download/.

  2. Run the MSI file to start the installation wizard. Accept the default settings to install IronPython.

Installing Visual Studio Community

  1. Download the latest version of Visual Studio Community from https://www.visualstudio.com/free-developer-offers/.

  2. Run the EXE file.

  3. On the Workloads screen, select these options:

    • .NET desktop development
    • Python development 

      For each, you can uncheck the other optional packages on the right side under Summary.
  1. Leave the default Location as is, and Click Install.

  2. Once installed, close the installer and Visual Studio.

  3. Download and extract the Macro SDK program from The specified item was not found. (control+click this link).
  4. Run the MSI.
    Note: In the unlikely event that you have problems with IronPython 2.78, download and run the IronPython2.78 fix.reg file

    from the TrimbleBusiness Center Macros and Extensions forum.

Starting a Project in Visual Studio

Create a Python project that can take advantage of Intellisense (intelligent code completion). Intellisense is "Intelligent code completion, a context-aware code completion feature in some programming environments that speeds up the process of coding applications by reducing typos and other common mistakes."

Note: At this time, Python Intellisense only works for x86/32-bit apps/version of Trimble Business Center.

  1. Launch Visual Studio.
  2. If prompted, sign in with your MSDN or Microsoft account, or select Not now. If needed, select General for Development Settings and Start Visual Studio.
  3. Select File > New  > Project.

  4. Select Python > TbcMacros.

  5. Enter a project name.

  6. For the Location, browse to C:\ProgramData\Trimble\MacroCommands, and click Select Folder.

  7. Click OK.

Next topic: 03 Configuring Your Visual Studio Project

Statistics
0 Favorited
231 Views
0 Files
0 Shares
0 Downloads

Comments

24 days ago

Gday...just wondering if I should be installing the latest versions of software (ie VS 2022) to get this working or if the previous versions are required?

11-11-2019 14:03

Thanks Gary,

 

Previously I've followed the instructions from the main article which say IronPyton -> VS -> Macros SDK.

I've uninstalled everything and started from the scratch, and now I can see TbcMacros in VS Templates. Time to move to step no. 03!

11-11-2019 09:05

There is no longer a need for the reg "fix". You should be able to get VS 2019 working by doing a few things: 

 

Install VS 2019 and select the python support (which you have likely done) You should install VS first!

Download and install the IronPython install package (should find an install file named IronPython-2.7.9.msi)

Download and install the macro SDK. (https://community.trimble.com/docs/DOC-31769-trimble-macros-sdkmsi-updated-for-vs-2019)

 

The macro SDK does two things. 

1) It installs 32 bit TBC dlls in the C:\Program Files (x86)\Trimble\Macros SDK folder. You don't actually need this it just make using the editor easier.

2) It installs a Visual Studio "template" in your documents folder (….\Documents\Visual Studio 2019\Templates\ProjectTemplates)

 

The template file (it's a zip file) should be used when creating your VS project as that sets some paths and debug targets. Again, not required but just makes it easy.

11-10-2019 15:19

Hi,

 

Can't get my copy of VS 2019 to work with TbcMacros.zip.

Where can I find "IronPython 2.78 fix.reg"?

 

I tried to search for it on the forum, but the only search result is the page that tells me to search for it...

 

Related Entries and Links

No Related Resource entered.