-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
578 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## Documentation | ||
You can find further documentation and help in the following links: | ||
- [TIA Portal Openness V16: System manual](https://support.industry.siemens.com/cs/document/109773802/simatic-tia-portal-openness-automating-creation-of-projects?dti=0&lc=en-WW) | ||
- [TIA Portal Openness V17: System manual](https://support.industry.siemens.com/cs/document/109798533/simatic-tia-portal-openness-api-for-automation-of-engineering-workflows?dti=0&lc=en-WW) | ||
- [TIA Portal Openness V18: System manual](https://support.industry.siemens.com/cs/document/109815199/simatic-tia-portal-openness-api-for-automation-of-engineering-workflows?dti=0&lc=en-WW) | ||
- [TIA Portal Openness V19: System manual](https://support.industry.siemens.com/cs/document/109826886/simatic-tia-portal-openness-api-for-automation-of-engineering-workflows?dti=0&lc=en-WW) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// See https://aka.ms/new-console-template for more information | ||
using System.Xml.Serialization; | ||
using System.Xml; | ||
|
||
Console.WriteLine("Hello, World!"); | ||
|
||
var fileName = @"C:\Users\capri\OneDrive\Documents\Automation\TIA069\UserFiles\Export\N100_Defauts.xml"; | ||
//var fileName = @"C:\Users\capri\OneDrive\Documents\Automation\TIA069\UserFiles\Export\LSKF_Motor.xml"; | ||
|
||
var settings = new XmlReaderSettings | ||
{ | ||
//ValidationType = ValidationType.Schema | ||
}; | ||
//settings.Schemas.Add("", @"Schemas\Commons\SW.Common_v3.xsd"); | ||
//settings.Schemas.Add("http://www.siemens.com/automation/Openness/SW/Interface/v5", @"Schemas\InterfaceSections\SW.InterfaceSections_v5.xsd"); | ||
|
||
|
||
var serializer = new XmlSerializer(typeof(SimaticML.Document)/*, attrOverrides*/); | ||
serializer.UnknownAttribute += OnUnknownAttribute; | ||
serializer.UnknownElement += OnUnknownElement; | ||
|
||
var reader = XmlReader.Create(fileName, settings); | ||
|
||
if (serializer.Deserialize(reader) is SimaticML.Document document) | ||
{ | ||
switch (document[0]) | ||
{ | ||
case SimaticML.SW.Blocks.GlobalDB globalDB: | ||
//var item = globalDB.AttributeList.Interface.Sections[0];//.Member[0]; | ||
|
||
break; | ||
} | ||
} | ||
|
||
|
||
void OnUnknownElement(object? sender, XmlElementEventArgs e) | ||
{ | ||
} | ||
|
||
void OnUnknownAttribute(object? sender, XmlAttributeEventArgs e) | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\SimaticML\SimaticML.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0-windows</TargetFramework> | ||
<LangVersion>latest</LangVersion> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" /> | ||
<PackageReference Include="MSTest" Version="3.6.4" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace SimaticML.test | ||
{ | ||
[TestClass] | ||
public sealed class Test1 | ||
{ | ||
[TestMethod] | ||
public void TestMethod1() | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.