Login Page - Create Account

Support Board


Date/Time: Wed, 15 Jan 2025 16:13:54 +0000



Post From: C# code integration

[2017-07-29 08:51:33]
gomifromparis - Posts: 244
You can call your c# lib from the Sierra dll if you compile it as a C++/CLI dll, it will then be able to run native and c# code.

Here's what it will look like :

SCSFExport scsf_GomSR(SCStudyGraphRef sc)
{
  if (sc.SetDefaults)
  {

    sc.GraphName = "GomSR";
    sc.StudyDescription = "Gom SR Zones";
    sc.AutoLoop = 1;

    Settings^ settings = gcnew Settings();
    settings->Show = false;

    return;
  }
}

Settings^ settings = gcnew Settings(); instantiates a c# object from the c++ code
settings->Show = false;; uses it.