skip to Main Content

I wrote two programs in Microsoft Visual Studio 2022 in C# (one that draws a geometric shape in Tekla Structures and another that just checks the connection between the application and Tekla Structures). With both (without having any code error) it gives me an error when running:

Inner Exception 1: `TypeInitializationException`: The type initializer for `'Tekla.Structures.DialogInternal.DelegateProxy'` threw an exception.

Inner Exception 2: `RemotingException`: Remote connection to Tekla Structures channel Tekla.Structures.Dialog-TeklaStructures-Console:2024.0.32149.0 failed

Inner Exception 3: `RemotingIOException`: Cannot connect to remoting service 'Tekla.Structures.Dialog-TeklaStructures-Console:2024.0.32149.0' because it does not exist.

Inner Exception 4: `FileNotFoundException`: Unable to find the specified file.

And the one that checks the connection tells me: "Connection failed!"

For both programs I used NuGet and installed the following packages:

Tekla.Common.Geometry
Tekla.Structures
Tekla.Structures.Datatype
Tekla.Structures.Model
Tekla.Structures.Catalogs
Tekla.Structures.Plugins
Tekla.Structures.Dialog
Tekla.Structures.Drawing
Tekla.Structures.CustomPropertyPlugin
Tekla.Application.Library

I kept looking for solutions but I couldn’t find anything either on Google or on the Tekla web site.

I didn’t find anything on the internet about 'Tekla.Structures.Dialog-TeklaStructures-Console:2024.0.32149.0'.

The program has no code errors detected by Microsoft Visual Studio, it should work, but it seems to be a problem connecting to Tekla Structures

Please help me

2

Answers


  1. Is your program connecting to Tekla Structures?

    Add the following above any calls made to Tekla:

    Model myModel = new Model();
    if (myModel.GetConnectionStatus())
    {
        MessageBox.Show("Tekla Structures not connected");
        return;
    }
    

    This checks if your program is connected.

    Login or Signup to reply.
  2. It seems you are using an old .NETFramework:

    "While it was previously possible to target older .NET Framework versions when using Tekla Open API libraries, .NET Framework 4.8 or newer is now required to compile tools using Tekla Open API 2024 libraries. .NET 6, 7, and 8 are not yet supported to compile tools."

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search