Ad

Sunday, April 07, 2024

Trimble Access Development

  • Ask for access from Trimble and install Trimble Installation Manager and include the API
  • Add Android path to the "PATH" system environment. The path should be checked to make sure it is correct. This will make it so the code will compile. It might be a setting I missed, but if Visual Studio indicates it can't find something, then add the path to the file locations. 
    C:\Microsoft\AndroidNDK64\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\
  • Modify Visual Studio for Android and Windows development for c++ if it doesn't already exists. 
  • If the install is on a server, install Wireless LAN from the Server Manager program, You know this is required if starting Trimble Access emulator says it can't find the "WLANAPI.dll" file. 
    https://www.youtube.com/watch?v=Mq6xhtiZeKM&t
  • If you make a mistake, make sure to clean and then rebuild. Otherwise, it will not copy all of the files properly. 
  • If there are copy file errors, then change the post build event to use "ByPass" instead of "unrestricted"
    powershell -executionpolicy ByPass -file "$(ProjectDir)CreateTimXml.ps1" -outfile "$(OutDir)$(TargetName).timxml" -lib "$(TargetFileName)" $(TimXmlProperties)

    • You might need to restart your computer and/or restart Visual Studio to get the projects to build and possibly clean the project and then build the code. Stuff appears to get cached which prevents things from working correctly using c++.

    Tuesday, April 02, 2024

    Trimble Access - X

     The Trimble Access SDK really sets one up for success in making you fully aware that there are other languages spoken than English. They set up all of their sample code to to have XCodes which are used to translate any string to the appropriate language.

    Unfortunately, the SDK documents have not been updated and some of the sample code solutions do not contain the required *XCodes.h files. This post explains how to create them. 

    The first step is to find the location of the TransitApp.exe folder. In my case it is in this folder: 

    "C:\Program Files\Trimble\Trimble Survey Core API v23.10\Tools\TransItApp.exe"

    In the same folder is a file called "ApiLanguageTool.exe". The "ApiLanguageTool.exe" allows you to run a command line prompt to process the file. I'm not a big fan of command line tools, so I probably don't know all of the tricks. Here are my steps.

    • Go to the start menu and type cmd and select the Command 
    • Type cd and paste the path of the exe location. This makes it so the command line can find the program.

    • You can then type ApiLanguageTool.exe ? to see what options are available. 

    • This will let you know the format the program is looking for. 
    • Then paste in the information. In this case, I'm creating the XCodes for the HowToSample solution. 


    • I didn't include the .h, but I should have to the XCodes name. The program will then process the tdb file and place it in the desired location. In my case, I needed to go back and make the change.
    It does appear one should be able to run the "TransitApp.exe" directly and get a UI, but on my computer it was failing.

    Tuesday, March 26, 2024

    AutoCAD 2025 - .NET 8 Build Folder

     AutoCAD 2025 was released, at least I think it was. I'm too lazy to find out. 

    AutoCAD 2025 has migrated from .NET Framework 4.7.2 to .NET 8 (previously named .NET Core). 

    With this change you might need to set the BaseIntermediateOutputPath in order to use a common code base between AutoCAD years. I've found that you can create a "Directory.Build.props" file and put it in the root folder of your solution. Then within the file add: 

    <Project>
     <PropertyGroup>
       <Deterministic>true</Deterministic>
       <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">obj\$(MSBuildProjectFile)\</BaseIntermediateOutputPath>
     </PropertyGroup>
    </Project>

    This will move the project build from the "obj" folder to a "obj/ProjectFileName" folder. This will cause the build for each project to go into their own folder and prevent projects from mingling and causing duplicate info that prevents the build from building. 

     Here is the help topic: https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory?view=vs-2019


    The app being built in the above example may be found here: 

    https://apps.autodesk.com/CIV3D/en/Detail/Index?id=6447637305413252324

    Tuesday, December 20, 2022

    Open Databases By Core Console

    I've added code to the https://github.com/C3DReminders/DFWBIUG_C3D_Data_Shortcuts_2020 repository to demonstrate how to open drawings without using the UI and extracting information from them using the AutoCAD core console. This method allows for the opening of drawings via multithreading. This sample code creates a simple text file, but the concepts could be expanded. 

    The name of the command is "OpenDbsByCoreConsole" and it is located in the OpenDatabasesCoreConsoleCommand class. 

    Note that some of the code was retrieved from the "Autodesk Batch Save Utility (Standalone)" by looking at the decompiled dll code. 

    Monday, December 19, 2022

    Open Databases By Side Loading

    I've added code to the https://github.com/C3DReminders/DFWBIUG_C3D_Data_Shortcuts_2020 repository to demonstrate how to open drawings without using the UI and extracting information from them. This sample code creates a simple text file, but the concepts could be expanded. 

    The name of the command is "OpenDbsBySideLoading" and it is located in the OpenDatabasesCommand class. 


    LinkWithin

    Blog Widget by LinkWithin

    Ad