diff --git a/tools/model_generator_dotnet/DynamicModelGenerator/DynamicModel.cs b/tools/model_generator_dotnet/DynamicModelGenerator/DynamicModel.cs
new file mode 100644
index 00000000..a7bfe7e0
--- /dev/null
+++ b/tools/model_generator_dotnet/DynamicModelGenerator/DynamicModel.cs
@@ -0,0 +1,59 @@
+using IEC61850.SCL;
+using IEC61850.SCL.DataModel;
+using System;
+using System.IO;
+using System.Linq;
+using System.Xml;
+
+namespace DynamicModel
+{
+ public class DynamicModel
+ {
+ public DynamicModel(string fileName, FileStream stream,
+ string iedName, string accessPointName)
+ {
+ try
+ {
+ SclDocument sclParser = new SclDocument(fileName);
+
+ SclIED ied = null;
+
+ if (iedName == null)
+ ied = sclParser.IEDs.First();
+ else
+ ied = sclParser.IEDs.Find(x => x.Name == iedName);
+
+ if (ied == null)
+ {
+ throw new Exception("IED model not found in SCL file! Exit.");
+ }
+
+ SclAccessPoint accessPoint = null;
+
+ if (accessPointName == null)
+ accessPoint = ied.AccessPoints.First();
+ else
+ accessPoint = ied.AccessPoints.Find(x => x.Name == accessPointName);
+
+ if (accessPoint == null)
+ {
+ throw new Exception("AccessPoint not found in SCL file! Exit.");
+ }
+
+ IEDDataModel iedModel = sclParser.GetDataModel(ied.Name, accessPoint.Name);
+
+
+ using (StreamWriter writer = new StreamWriter(stream))
+ {
+
+ DynamicModelGenerator dynamicModelGenerator = new DynamicModelGenerator(sclParser, writer, iedModel, accessPoint);
+ }
+ }
+ catch (Exception ex)
+ {
+ Console.Write(ex.ToString());
+ }
+
+ }
+ }
+}
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGenerator/ModelGenerator.csproj b/tools/model_generator_dotnet/DynamicModelGenerator/DynamicModelGenerator.csproj
similarity index 70%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGenerator/ModelGenerator.csproj
rename to tools/model_generator_dotnet/DynamicModelGenerator/DynamicModelGenerator.csproj
index 73e1bbff..4e4c8ce8 100644
--- a/tools/model_generator_dotnet/ModelGenerator/ModelGenerator/ModelGenerator.csproj
+++ b/tools/model_generator_dotnet/DynamicModelGenerator/DynamicModelGenerator.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGenerator.sln b/tools/model_generator_dotnet/ModelGenerator/ModelGenerator.sln
deleted file mode 100644
index b7429a3b..00000000
--- a/tools/model_generator_dotnet/ModelGenerator/ModelGenerator.sln
+++ /dev/null
@@ -1,37 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.11.35327.3
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ModelGenerator", "ModelGenerator\ModelGenerator.csproj", "{FB5457AA-CE89-48BB-8F1F-2540DF894492}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ModelGeneratorExample", "ModelGeneratorExample\ModelGeneratorExample.csproj", "{A80ED62D-CCA9-4D8E-B04D-9BEA5CD7DF78}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SCLParser", "..\..\SCLParser\SCLParser.csproj", "{88069284-150D-4BAE-8C7B-140298C5C011}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {FB5457AA-CE89-48BB-8F1F-2540DF894492}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FB5457AA-CE89-48BB-8F1F-2540DF894492}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FB5457AA-CE89-48BB-8F1F-2540DF894492}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FB5457AA-CE89-48BB-8F1F-2540DF894492}.Release|Any CPU.Build.0 = Release|Any CPU
- {A80ED62D-CCA9-4D8E-B04D-9BEA5CD7DF78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A80ED62D-CCA9-4D8E-B04D-9BEA5CD7DF78}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A80ED62D-CCA9-4D8E-B04D-9BEA5CD7DF78}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A80ED62D-CCA9-4D8E-B04D-9BEA5CD7DF78}.Release|Any CPU.Build.0 = Release|Any CPU
- {88069284-150D-4BAE-8C7B-140298C5C011}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {88069284-150D-4BAE-8C7B-140298C5C011}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {88069284-150D-4BAE-8C7B-140298C5C011}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {88069284-150D-4BAE-8C7B-140298C5C011}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {4D5970CE-F389-4BCE-934E-F1E597AFEE22}
- EndGlobalSection
-EndGlobal
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/Program.cs b/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/Program.cs
deleted file mode 100644
index ecb50b48..00000000
--- a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/Program.cs
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright 2013-2025 Michael Zillgith, MZ Automation GmbH
- *
- * This file is part of MZ Automation IEC 61850 SDK
- *
- * All rights reserved.
- */
-
-using ModelGenerator;
-
-namespace modeGenerator_example
-{
-
- ///
- /// This example shows how to handle a large number of information objects
- ///
- class MainClass
- {
- public static void Main(string[] args)
- {
- string icdFile = "ICDFiles//simpleIO_ltrk_tests.icd";
- string outputFileName = "static_model";
-
- string accessPointName = null;
- string iedName = null;
- string modelPrefix = "iedModel";
- bool initializeOnce = false;
-
- Console.WriteLine("Usage: genmodel [-ied ] [-ap ] [-out ] [-modelprefix ]");
-
- if (args.Count() > 0)
- {
- icdFile = args[0];
-
- for (int i = 1; i < args.Count(); i++)
- {
- if (args[i] == ("-ap"))
- {
- accessPointName = args[i + 1];
-
- Console.WriteLine("Select access point " + accessPointName);
-
- i++;
- }
- else if (args[i] == ("-ied"))
- {
- iedName = args[i + 1];
-
- Console.WriteLine("Select IED " + iedName);
-
- i++;
-
- }
- else if (args[i] == ("-out"))
- {
- outputFileName = args[i + 1];
-
- Console.WriteLine("Select Output File " + outputFileName);
-
- i++;
-
- }
- else if (args[i] == ("-modelprefix"))
- {
- modelPrefix = args[i + 1];
-
- Console.WriteLine("Select Model Prefix " + modelPrefix);
-
- i++;
-
- }
- else if (args[i] == ("-initializeonce"))
- {
- initializeOnce = true;
-
- Console.WriteLine("Select Initialize Once");
-
- }
- else
- {
- Console.WriteLine("Unknown option: \"" + args[i] + "\"");
- }
- }
- }
-
- // Creating file streams
- FileStream cOutStream = new FileStream(outputFileName + ".c", FileMode.Create, FileAccess.Write);
- FileStream hOutStream = new FileStream(outputFileName + ".h", FileMode.Create, FileAccess.Write);
-
- Console.WriteLine("Select ICD File " + icdFile);
-
- try
- {
- new StaticModelGenerator(icdFile, icdFile, cOutStream, hOutStream, outputFileName, iedName, accessPointName, modelPrefix, initializeOnce);
- }
- catch (Exception e)
- {
- Console.WriteLine("ERROR: " + e.ToString());
- }
- }
- }
-}
\ No newline at end of file
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/README.md b/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/README.md
deleted file mode 100644
index 12e1108a..00000000
--- a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-This tool can be accessed from both the command line of visual studio.
-To run the tool from the command line a command of the following format has to be generated:
-
-genmodel -ied -ap -out -modelprefix
-
-The values in <> have to be replaced with the values corresponding to an arbitrary ICD file.
-To run this command completely the command should look like this:
-
-ModelGeneratorExample.exe/(dotnet ModelGeneratorExample.dll) genmodel -ied -ap -out -modelprefix
-
-Example:
-
-ModelGeneratorExample.exe ICDFiles/simpleIO_smv.icd -ied simpleIO -ap accessPoint1 -out static_model -modelprefix iedModel
-
-or
-
-dotnet ModelGeneratorExample.dll ICDFiles/simpleIO_smv.icd -ied simpleIO -ap accessPoint1 -out static_model -modelprefix iedModel
\ No newline at end of file
diff --git a/tools/model_generator_dotnet/README.md b/tools/model_generator_dotnet/README.md
new file mode 100644
index 00000000..710445b4
--- /dev/null
+++ b/tools/model_generator_dotnet/README.md
@@ -0,0 +1,17 @@
+This tool can be accessed from both the command line of visual studio.
+To run the tool from the command line a command of the following format has to be generated:
+
+ -ied -ap -out -modelprefix
+
+The values in <> have to be replaced with the values corresponding to an arbitrary ICD file.
+To run this command completely the command should look like this:
+
+Tools.exe/(dotnet Tools.dll) -ied -ap -out -modelprefix
+
+Example:
+
+Tools.exe 1 ICDFiles/genericIO.icd -ied simpleIO -ap accessPoint1 -out static_model -modelprefix iedModel
+
+or
+
+dotnet Tools.dll 1 ICDFiles/genericIO.icd -ied simpleIO -ap accessPoint1 -out static_model -modelprefix iedModel
\ No newline at end of file
diff --git a/tools/SCLParser/SCLParser.csproj b/tools/model_generator_dotnet/SCLParser/SCLParser.csproj
similarity index 100%
rename from tools/SCLParser/SCLParser.csproj
rename to tools/model_generator_dotnet/SCLParser/SCLParser.csproj
diff --git a/tools/SCLParser/src/CommonDataClasses.cs b/tools/model_generator_dotnet/SCLParser/src/CommonDataClasses.cs
similarity index 100%
rename from tools/SCLParser/src/CommonDataClasses.cs
rename to tools/model_generator_dotnet/SCLParser/src/CommonDataClasses.cs
diff --git a/tools/SCLParser/src/DataModel.cs b/tools/model_generator_dotnet/SCLParser/src/DataModel.cs
similarity index 100%
rename from tools/SCLParser/src/DataModel.cs
rename to tools/model_generator_dotnet/SCLParser/src/DataModel.cs
diff --git a/tools/SCLParser/src/DynamicModelGenerator.cs b/tools/model_generator_dotnet/SCLParser/src/DynamicModelGenerator.cs
similarity index 100%
rename from tools/SCLParser/src/DynamicModelGenerator.cs
rename to tools/model_generator_dotnet/SCLParser/src/DynamicModelGenerator.cs
diff --git a/tools/SCLParser/src/ExtRef.cs b/tools/model_generator_dotnet/SCLParser/src/ExtRef.cs
similarity index 100%
rename from tools/SCLParser/src/ExtRef.cs
rename to tools/model_generator_dotnet/SCLParser/src/ExtRef.cs
diff --git a/tools/SCLParser/src/SclBaseElement.cs b/tools/model_generator_dotnet/SCLParser/src/SclBaseElement.cs
similarity index 100%
rename from tools/SCLParser/src/SclBaseElement.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclBaseElement.cs
diff --git a/tools/SCLParser/src/SclCommunication.cs b/tools/model_generator_dotnet/SCLParser/src/SclCommunication.cs
similarity index 100%
rename from tools/SCLParser/src/SclCommunication.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclCommunication.cs
diff --git a/tools/SCLParser/src/SclDataTypeTemplates.cs b/tools/model_generator_dotnet/SCLParser/src/SclDataTypeTemplates.cs
similarity index 100%
rename from tools/SCLParser/src/SclDataTypeTemplates.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclDataTypeTemplates.cs
diff --git a/tools/SCLParser/src/SclDocument.cs b/tools/model_generator_dotnet/SCLParser/src/SclDocument.cs
similarity index 100%
rename from tools/SCLParser/src/SclDocument.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclDocument.cs
diff --git a/tools/SCLParser/src/SclElementWithPrivate.cs b/tools/model_generator_dotnet/SCLParser/src/SclElementWithPrivate.cs
similarity index 100%
rename from tools/SCLParser/src/SclElementWithPrivate.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclElementWithPrivate.cs
diff --git a/tools/SCLParser/src/SclElements.cs b/tools/model_generator_dotnet/SCLParser/src/SclElements.cs
similarity index 100%
rename from tools/SCLParser/src/SclElements.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclElements.cs
diff --git a/tools/SCLParser/src/SclEquipment.cs b/tools/model_generator_dotnet/SCLParser/src/SclEquipment.cs
similarity index 100%
rename from tools/SCLParser/src/SclEquipment.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclEquipment.cs
diff --git a/tools/SCLParser/src/SclEquipmentFunctions.cs b/tools/model_generator_dotnet/SCLParser/src/SclEquipmentFunctions.cs
similarity index 100%
rename from tools/SCLParser/src/SclEquipmentFunctions.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclEquipmentFunctions.cs
diff --git a/tools/SCLParser/src/SclGSEControl.cs b/tools/model_generator_dotnet/SCLParser/src/SclGSEControl.cs
similarity index 100%
rename from tools/SCLParser/src/SclGSEControl.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclGSEControl.cs
diff --git a/tools/SCLParser/src/SclHeader.cs b/tools/model_generator_dotnet/SCLParser/src/SclHeader.cs
similarity index 100%
rename from tools/SCLParser/src/SclHeader.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclHeader.cs
diff --git a/tools/SCLParser/src/SclLogControl.cs b/tools/model_generator_dotnet/SCLParser/src/SclLogControl.cs
similarity index 100%
rename from tools/SCLParser/src/SclLogControl.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclLogControl.cs
diff --git a/tools/SCLParser/src/SclPrivate.cs b/tools/model_generator_dotnet/SCLParser/src/SclPrivate.cs
similarity index 100%
rename from tools/SCLParser/src/SclPrivate.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclPrivate.cs
diff --git a/tools/SCLParser/src/SclSMVControl.cs b/tools/model_generator_dotnet/SCLParser/src/SclSMVControl.cs
similarity index 100%
rename from tools/SCLParser/src/SclSMVControl.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclSMVControl.cs
diff --git a/tools/SCLParser/src/SclServices.cs b/tools/model_generator_dotnet/SCLParser/src/SclServices.cs
similarity index 100%
rename from tools/SCLParser/src/SclServices.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclServices.cs
diff --git a/tools/SCLParser/src/SclSettingControl.cs b/tools/model_generator_dotnet/SCLParser/src/SclSettingControl.cs
similarity index 100%
rename from tools/SCLParser/src/SclSettingControl.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclSettingControl.cs
diff --git a/tools/SCLParser/src/SclSubstation.cs b/tools/model_generator_dotnet/SCLParser/src/SclSubstation.cs
similarity index 100%
rename from tools/SCLParser/src/SclSubstation.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclSubstation.cs
diff --git a/tools/SCLParser/src/SclType.cs b/tools/model_generator_dotnet/SCLParser/src/SclType.cs
similarity index 100%
rename from tools/SCLParser/src/SclType.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclType.cs
diff --git a/tools/SCLParser/src/SclValidatorMessage.cs b/tools/model_generator_dotnet/SCLParser/src/SclValidatorMessage.cs
similarity index 100%
rename from tools/SCLParser/src/SclValidatorMessage.cs
rename to tools/model_generator_dotnet/SCLParser/src/SclValidatorMessage.cs
diff --git a/tools/SCLParser/src/XmlHelper.cs b/tools/model_generator_dotnet/SCLParser/src/XmlHelper.cs
similarity index 100%
rename from tools/SCLParser/src/XmlHelper.cs
rename to tools/model_generator_dotnet/SCLParser/src/XmlHelper.cs
diff --git a/tools/model_generator_dotnet/StaticModelGenerator/StaticModelGenerator.csproj b/tools/model_generator_dotnet/StaticModelGenerator/StaticModelGenerator.csproj
new file mode 100644
index 00000000..4e4c8ce8
--- /dev/null
+++ b/tools/model_generator_dotnet/StaticModelGenerator/StaticModelGenerator.csproj
@@ -0,0 +1,11 @@
+
+
+
+ netstandard2.0
+
+
+
+
+
+
+
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGenerator/src/C_Structures.cs b/tools/model_generator_dotnet/StaticModelGenerator/src/C_Structures.cs
similarity index 99%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGenerator/src/C_Structures.cs
rename to tools/model_generator_dotnet/StaticModelGenerator/src/C_Structures.cs
index 53ad9a38..cbb77c1a 100644
--- a/tools/model_generator_dotnet/ModelGenerator/ModelGenerator/src/C_Structures.cs
+++ b/tools/model_generator_dotnet/StaticModelGenerator/src/C_Structures.cs
@@ -11,7 +11,7 @@ using IEC61850.SCL.DataModel;
using System;
using System.Collections.Generic;
-namespace ModelGenerator.C_Structures
+namespace StaticModelGenerator.C_Structures
{
/** FCs (Functional constraints) according to IEC 61850-7-2 */
public enum eFunctionalConstraint
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGenerator/src/StaticModelGenerator.cs b/tools/model_generator_dotnet/StaticModelGenerator/src/StaticModelGenerator.cs
similarity index 99%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGenerator/src/StaticModelGenerator.cs
rename to tools/model_generator_dotnet/StaticModelGenerator/src/StaticModelGenerator.cs
index 8fd65b8c..e319bcba 100644
--- a/tools/model_generator_dotnet/ModelGenerator/ModelGenerator/src/StaticModelGenerator.cs
+++ b/tools/model_generator_dotnet/StaticModelGenerator/src/StaticModelGenerator.cs
@@ -8,7 +8,7 @@
using IEC61850.SCL;
using IEC61850.SCL.DataModel;
-using ModelGenerator.C_Structures;
+using StaticModelGenerator.C_Structures;
using System;
using System.Collections.Generic;
using System.IO;
@@ -17,7 +17,7 @@ using System.Net;
using System.Runtime.InteropServices.ComTypes;
using DataSet = IEC61850.SCL.DataModel.DataSet;
-namespace ModelGenerator
+namespace StaticModelGenerator
{
public class StaticModelGenerator
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/cid_example_deadband.cid b/tools/model_generator_dotnet/Tools/ICDFiles/cid_example_deadband.cid
similarity index 100%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/cid_example_deadband.cid
rename to tools/model_generator_dotnet/Tools/ICDFiles/cid_example_deadband.cid
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/complexModel.icd b/tools/model_generator_dotnet/Tools/ICDFiles/complexModel.icd
similarity index 100%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/complexModel.icd
rename to tools/model_generator_dotnet/Tools/ICDFiles/complexModel.icd
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/genericIO.icd b/tools/model_generator_dotnet/Tools/ICDFiles/genericIO.icd
similarity index 100%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/genericIO.icd
rename to tools/model_generator_dotnet/Tools/ICDFiles/genericIO.icd
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/inverter3ph.icd b/tools/model_generator_dotnet/Tools/ICDFiles/inverter3ph.icd
similarity index 100%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/inverter3ph.icd
rename to tools/model_generator_dotnet/Tools/ICDFiles/inverter3ph.icd
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/inverter_with_report.icd b/tools/model_generator_dotnet/Tools/ICDFiles/inverter_with_report.icd
similarity index 100%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/inverter_with_report.icd
rename to tools/model_generator_dotnet/Tools/ICDFiles/inverter_with_report.icd
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/sampleModel.icd b/tools/model_generator_dotnet/Tools/ICDFiles/sampleModel.icd
similarity index 100%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/sampleModel.icd
rename to tools/model_generator_dotnet/Tools/ICDFiles/sampleModel.icd
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/sampleModel_errors.icd b/tools/model_generator_dotnet/Tools/ICDFiles/sampleModel_errors.icd
similarity index 100%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/sampleModel_errors.icd
rename to tools/model_generator_dotnet/Tools/ICDFiles/sampleModel_errors.icd
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/sampleModel_with_dataset.icd b/tools/model_generator_dotnet/Tools/ICDFiles/sampleModel_with_dataset.icd
similarity index 100%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/sampleModel_with_dataset.icd
rename to tools/model_generator_dotnet/Tools/ICDFiles/sampleModel_with_dataset.icd
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/simpleIO_control_tests.cid b/tools/model_generator_dotnet/Tools/ICDFiles/simpleIO_control_tests.cid
similarity index 100%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/simpleIO_control_tests.cid
rename to tools/model_generator_dotnet/Tools/ICDFiles/simpleIO_control_tests.cid
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/simpleIO_direct_control.cid b/tools/model_generator_dotnet/Tools/ICDFiles/simpleIO_direct_control.cid
similarity index 100%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/simpleIO_direct_control.cid
rename to tools/model_generator_dotnet/Tools/ICDFiles/simpleIO_direct_control.cid
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/simpleIO_direct_control.icd b/tools/model_generator_dotnet/Tools/ICDFiles/simpleIO_direct_control.icd
similarity index 100%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/simpleIO_direct_control.icd
rename to tools/model_generator_dotnet/Tools/ICDFiles/simpleIO_direct_control.icd
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/simpleIO_direct_control_goose.cid b/tools/model_generator_dotnet/Tools/ICDFiles/simpleIO_direct_control_goose.cid
similarity index 100%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/simpleIO_direct_control_goose.cid
rename to tools/model_generator_dotnet/Tools/ICDFiles/simpleIO_direct_control_goose.cid
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/simpleIO_direct_control_goose.scd b/tools/model_generator_dotnet/Tools/ICDFiles/simpleIO_direct_control_goose.scd
similarity index 100%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/simpleIO_direct_control_goose.scd
rename to tools/model_generator_dotnet/Tools/ICDFiles/simpleIO_direct_control_goose.scd
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/simpleIO_ltrk_tests.icd b/tools/model_generator_dotnet/Tools/ICDFiles/simpleIO_ltrk_tests.icd
similarity index 100%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ICDFiles/simpleIO_ltrk_tests.icd
rename to tools/model_generator_dotnet/Tools/ICDFiles/simpleIO_ltrk_tests.icd
diff --git a/tools/model_generator_dotnet/Tools/Program.cs b/tools/model_generator_dotnet/Tools/Program.cs
new file mode 100644
index 00000000..a0e417b8
--- /dev/null
+++ b/tools/model_generator_dotnet/Tools/Program.cs
@@ -0,0 +1,132 @@
+/*
+ * Copyright 2013-2025 Michael Zillgith, MZ Automation GmbH
+ *
+ * This file is part of MZ Automation IEC 61850 SDK
+ *
+ * All rights reserved.
+ */
+
+using StaticModelGenerator;
+
+namespace modeGenerator_example
+{
+
+ ///
+ /// This example shows how to handle a large number of information objects
+ ///
+ class MainClass
+ {
+ public static void Main(string[] args)
+ {
+ Console.WriteLine("Usage: Static Model (1) \n Dynamic Model (2) \n [-ied ] [-ap ] [-out ] [-modelprefix ]");
+
+ if (args.Length == 0)
+ {
+ Console.WriteLine("Parse the arguments \n" +
+ "Usage: Static Model (1) \n Dynamic Model (2) \n [-ied ] [-ap ] [-out ] [-modelprefix ]");
+ }
+ else
+ {
+ string accessPointName = null;
+ string iedName = null;
+ string icdFile = "ICDFiles//simpleIO_ltrk_tests.icd";
+ string outputFileName = "static_model";
+ string modelPrefix = "iedModel";
+ bool initializeOnce = false;
+ icdFile = args[1];
+
+
+ for (int i = 2; i < args.Count(); i++)
+ {
+ if (args[i] == ("-ap"))
+ {
+ accessPointName = args[i + 1];
+
+ Console.WriteLine("Select access point " + accessPointName);
+
+ i++;
+ }
+ else if (args[i] == ("-ied"))
+ {
+ iedName = args[i + 1];
+
+ Console.WriteLine("Select IED " + iedName);
+
+ i++;
+
+ }
+ else if (args[i] == ("-out"))
+ {
+ outputFileName = args[i + 1];
+
+ Console.WriteLine("Select Output File " + outputFileName);
+
+ i++;
+
+ }
+ else if (args[i] == ("-modelprefix"))
+ {
+ modelPrefix = args[i + 1];
+
+ Console.WriteLine("Select Model Prefix " + modelPrefix);
+
+ i++;
+
+ }
+ else if (args[i] == ("-initializeonce"))
+ {
+ initializeOnce = true;
+
+ Console.WriteLine("Select Initialize Once");
+
+ }
+ else
+ {
+ Console.WriteLine("Unknown option: \"" + args[i] + "\"");
+ }
+ }
+
+ if (args[0] == "1")
+ {
+ Console.WriteLine("Generate Static Model");
+
+ FileStream cOutStream = new FileStream(outputFileName + ".c", FileMode.Create, FileAccess.Write);
+ FileStream hOutStream = new FileStream(outputFileName + ".h", FileMode.Create, FileAccess.Write);
+
+ try
+ {
+ new StaticModelGenerator.StaticModelGenerator(icdFile, icdFile, cOutStream, hOutStream, outputFileName, iedName, accessPointName, modelPrefix, initializeOnce);
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine("ERROR: " + e.ToString());
+ }
+
+ }
+ else if (args[0] == "2")
+ {
+ Console.WriteLine("Generate Dynamic Model");
+
+ try
+ {
+ FileStream stream = new FileStream(outputFileName + ".cfg", FileMode.Create, FileAccess.Write);
+ new DynamicModel.DynamicModel(icdFile, stream, iedName, accessPointName);
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine("ERROR: " + e.ToString());
+ }
+ }
+ else
+ {
+ Console.WriteLine("Wrong option, parse 1 or 2 \n" +
+ "Usage: Static Model (1) \n Dynamic Model (2) \n [-ied ] [-ap ] [-out ] [-modelprefix ]");
+ }
+
+
+
+ }
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ModelGeneratorExample.csproj b/tools/model_generator_dotnet/Tools/Tools.csproj
similarity index 94%
rename from tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ModelGeneratorExample.csproj
rename to tools/model_generator_dotnet/Tools/Tools.csproj
index 6662a509..09e31c57 100644
--- a/tools/model_generator_dotnet/ModelGenerator/ModelGeneratorExample/ModelGeneratorExample.csproj
+++ b/tools/model_generator_dotnet/Tools/Tools.csproj
@@ -70,7 +70,8 @@
-
+
+
diff --git a/tools/model_generator_dotnet/Tools_ModelGenerator.sln b/tools/model_generator_dotnet/Tools_ModelGenerator.sln
new file mode 100644
index 00000000..c0fa1c13
--- /dev/null
+++ b/tools/model_generator_dotnet/Tools_ModelGenerator.sln
@@ -0,0 +1,43 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.11.35327.3
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamicModelGenerator", "DynamicModelGenerator\DynamicModelGenerator.csproj", "{3269555F-ECB9-4304-936A-8FC6153AB5BD}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SCLParser", "SCLParser\SCLParser.csproj", "{AF771AA2-C3EB-4F0A-884A-6B79C9977BE2}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StaticModelGenerator", "StaticModelGenerator\StaticModelGenerator.csproj", "{992389DE-80E6-422B-8536-6D39E864118B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tools", "Tools\Tools.csproj", "{8103E20D-0EE9-443B-B7B4-6641D4EF85C7}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {3269555F-ECB9-4304-936A-8FC6153AB5BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3269555F-ECB9-4304-936A-8FC6153AB5BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3269555F-ECB9-4304-936A-8FC6153AB5BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3269555F-ECB9-4304-936A-8FC6153AB5BD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AF771AA2-C3EB-4F0A-884A-6B79C9977BE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AF771AA2-C3EB-4F0A-884A-6B79C9977BE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AF771AA2-C3EB-4F0A-884A-6B79C9977BE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AF771AA2-C3EB-4F0A-884A-6B79C9977BE2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {992389DE-80E6-422B-8536-6D39E864118B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {992389DE-80E6-422B-8536-6D39E864118B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {992389DE-80E6-422B-8536-6D39E864118B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {992389DE-80E6-422B-8536-6D39E864118B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8103E20D-0EE9-443B-B7B4-6641D4EF85C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8103E20D-0EE9-443B-B7B4-6641D4EF85C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8103E20D-0EE9-443B-B7B4-6641D4EF85C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8103E20D-0EE9-443B-B7B4-6641D4EF85C7}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {4D5970CE-F389-4BCE-934E-F1E597AFEE22}
+ EndGlobalSection
+EndGlobal