We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

[Thermal Desktop] [OpenTD] Connecting to Thermal Desktop within C# Methods

    • mhaas
      Subscriber

      Hi,
      I am writing an OpenTD script in C# that I organize into methods. I want to be able to create an instance of Thermal Desktop only once for the whole namespace. Currently, in each method I have the following lines of code.

      var td = new ThermalDesktop();
      td.ConnectConfig.DwgPathname = dwgFilePath;
      td.Connect();

      where dwgFilePath is a string I input into each method. This method works, but takes a long time to connect to Thermal Desktop, and I call methods with this header hundreds of times in my scripts.

      I am looking for a way to not have to redefine (and hopefully reconnect to) Thermal Desktop within each method, while still being able to use the td alias within the method. Is there a way to declare these three lines globally? When I try to declare it at the class level, I am unable to use the type var.

      Thank you!

Viewing 0 reply threads
  • You must be logged in to reply to this topic.