Skip to content

Commit 1bd5ba4

Browse files
committed
v4.0
1 parent 21f9232 commit 1bd5ba4

108 files changed

Lines changed: 3572 additions & 3705 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/EPLAN Remote Client/App.config

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
2-
<configuration>
3-
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
5-
</startup>
6-
</configuration>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup>
4+
</startup>
5+
</configuration>
Lines changed: 88 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,89 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4-
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{2C14B903-C97D-4FC3-AECC-613922C8427E}</ProjectGuid>
8-
<OutputType>Exe</OutputType>
9-
<RootNamespace>EPLAN_Remote_Client</RootNamespace>
10-
<AssemblyName>EPLAN Remote Client</AssemblyName>
11-
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
12-
<FileAlignment>512</FileAlignment>
13-
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14-
<Deterministic>true</Deterministic>
15-
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<PlatformTarget>AnyCPU</PlatformTarget>
18-
<DebugSymbols>true</DebugSymbols>
19-
<DebugType>full</DebugType>
20-
<Optimize>false</Optimize>
21-
<OutputPath>bin\Debug\</OutputPath>
22-
<DefineConstants>DEBUG;TRACE</DefineConstants>
23-
<ErrorReport>prompt</ErrorReport>
24-
<WarningLevel>4</WarningLevel>
25-
</PropertyGroup>
26-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27-
<PlatformTarget>AnyCPU</PlatformTarget>
28-
<DebugType>pdbonly</DebugType>
29-
<Optimize>true</Optimize>
30-
<OutputPath>bin\Release\</OutputPath>
31-
<DefineConstants>TRACE</DefineConstants>
32-
<ErrorReport>prompt</ErrorReport>
33-
<WarningLevel>4</WarningLevel>
34-
</PropertyGroup>
35-
<ItemGroup>
36-
<Reference Include="Eplan.EplApi.RemoteClientu, Version=1.0.0.0, Culture=neutral, PublicKeyToken=57aaa27e22f7b107, processorArchitecture=MSIL">
37-
<SpecificVersion>False</SpecificVersion>
38-
<HintPath>C:\Program Files\EPLAN\Platform\2022.0.3\Bin\Eplan.EplApi.RemoteClientu.dll</HintPath>
39-
</Reference>
40-
<Reference Include="Eplan.EplApi.Starteru, Version=1.0.0.0, Culture=neutral, PublicKeyToken=57aaa27e22f7b107, processorArchitecture=MSIL">
41-
<SpecificVersion>False</SpecificVersion>
42-
<HintPath>C:\Program Files\EPLAN\Platform\2022.0.3\Bin\Eplan.EplApi.Starteru.dll</HintPath>
43-
</Reference>
44-
<Reference Include="System" />
45-
<Reference Include="System.Core" />
46-
<Reference Include="System.Xml.Linq" />
47-
<Reference Include="System.Data.DataSetExtensions" />
48-
<Reference Include="Microsoft.CSharp" />
49-
<Reference Include="System.Data" />
50-
<Reference Include="System.Net.Http" />
51-
<Reference Include="System.Xml" />
52-
</ItemGroup>
53-
<ItemGroup>
54-
<Compile Include="Program.cs" />
55-
<Compile Include="Properties\AssemblyInfo.cs" />
56-
</ItemGroup>
57-
<ItemGroup>
58-
<None Include="App.config" />
59-
</ItemGroup>
60-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{2C14B903-C97D-4FC3-AECC-613922C8427E}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<RootNamespace>EPLAN_Remote_Client</RootNamespace>
10+
<AssemblyName>EPLAN Remote Client</AssemblyName>
11+
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<Deterministic>true</Deterministic>
15+
<TargetFrameworkProfile />
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<PlatformTarget>x64</PlatformTarget>
19+
<DebugSymbols>true</DebugSymbols>
20+
<DebugType>full</DebugType>
21+
<Optimize>false</Optimize>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DefineConstants>DEBUG;TRACE</DefineConstants>
24+
<ErrorReport>prompt</ErrorReport>
25+
<WarningLevel>4</WarningLevel>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<PlatformTarget>AnyCPU</PlatformTarget>
29+
<DebugType>pdbonly</DebugType>
30+
<Optimize>true</Optimize>
31+
<OutputPath>bin\Release\</OutputPath>
32+
<DefineConstants>TRACE</DefineConstants>
33+
<ErrorReport>prompt</ErrorReport>
34+
<WarningLevel>4</WarningLevel>
35+
</PropertyGroup>
36+
<ItemGroup>
37+
<Reference Include="Eplan.EplApi.RemoteClientu">
38+
<SpecificVersion>False</SpecificVersion>
39+
<HintPath>C:\Program Files\EPLAN\Platform\2026.0.1\Bin\Eplan.EplApi.RemoteClientu.dll</HintPath>
40+
<Private>True</Private>
41+
</Reference>
42+
<Reference Include="Eplan.EplApi.Remotingu">
43+
<SpecificVersion>False</SpecificVersion>
44+
<HintPath>C:\Program Files\EPLAN\Platform\2026.0.1\Bin\Eplan.EplApi.Remotingu.dll</HintPath>
45+
<Private>True</Private>
46+
</Reference>
47+
<Reference Include="Google.Protobuf">
48+
<SpecificVersion>False</SpecificVersion>
49+
<HintPath>C:\Program Files\EPLAN\Platform\2026.0.1\Bin\Google.Protobuf.dll</HintPath>
50+
<Private>True</Private>
51+
</Reference>
52+
<Reference Include="Grpc.Core">
53+
<SpecificVersion>False</SpecificVersion>
54+
<HintPath>C:\Program Files\EPLAN\Platform\2026.0.1\Bin\Grpc.Core.dll</HintPath>
55+
<Private>True</Private>
56+
</Reference>
57+
<Reference Include="Grpc.Core.Api">
58+
<SpecificVersion>False</SpecificVersion>
59+
<HintPath>C:\Program Files\EPLAN\Platform\2026.0.1\Bin\Grpc.Core.Api.dll</HintPath>
60+
<Private>True</Private>
61+
</Reference>
62+
<Reference Include="System" />
63+
<Reference Include="System.Core" />
64+
<Reference Include="System.Memory, Version=4.0.1.2" />
65+
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0" />
66+
<Reference Include="System.Runtime.Remoting" />
67+
<Reference Include="System.Xml.Linq" />
68+
<Reference Include="System.Data.DataSetExtensions" />
69+
<Reference Include="Microsoft.CSharp">
70+
<Private>True</Private>
71+
</Reference>
72+
<Reference Include="System.Data" />
73+
<Reference Include="System.Net.Http" />
74+
<Reference Include="System.Xml" />
75+
</ItemGroup>
76+
<ItemGroup>
77+
<Compile Include="Program.cs" />
78+
<Compile Include="Properties\AssemblyInfo.cs" />
79+
</ItemGroup>
80+
<ItemGroup>
81+
<None Include="App.config" />
82+
</ItemGroup>
83+
<ItemGroup>
84+
<Content Include="grpc_csharp_ext.x64.dll">
85+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
86+
</Content>
87+
</ItemGroup>
88+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
6189
</Project>

src/EPLAN Remote Client/Program.cs

Lines changed: 47 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,48 @@
1-
using Eplan.EplApi.RemoteClient;
2-
using Eplan.EplApi.Starter;
3-
using System;
4-
using System.Collections.Generic;
5-
using System.Diagnostics;
6-
using System.Linq;
7-
8-
namespace EPLAN_Remote_Client
9-
{
10-
internal class Program
11-
{
12-
static void Main(string[] args)
13-
{
14-
List<EplanServerData> instancesActive = GetActiveEplanInstances();
15-
if (instancesActive.Any())
16-
{
17-
Console.WriteLine("Starte aktive Instanz...");
18-
EplanServerData eplanInstanceActive = instancesActive
19-
.OrderBy(obj => obj.EplanVersion)
20-
.Last();
21-
22-
ExecuteActive(eplanInstanceActive);
23-
}
24-
else
25-
{
26-
Console.WriteLine("Keine aktive Instanz gefunden.");
27-
28-
List<EplanData> instancesInstalled = GetInstalledEplanInstances();
29-
instancesInstalled = instancesInstalled
30-
.Where(obj =>
31-
obj.EplanVariant.Equals("Electric P8") &&
32-
obj.EplanVersion.StartsWith("2022"))
33-
.OrderBy(obj => obj.EplanVersion)
34-
.ToList();
35-
if (instancesInstalled.Any())
36-
{
37-
Console.WriteLine("Starte installierte Instanz...");
38-
EplanData eplanInstanceInstalled = instancesInstalled.Last();
39-
40-
ExecuteInstalled(eplanInstanceInstalled);
41-
}
42-
else
43-
{
44-
Console.WriteLine("Keine installierte Instanz gefunden.");
45-
}
46-
}
47-
48-
Console.WriteLine("Ausführung abgeschlossen.");
49-
Console.ReadKey();
50-
}
51-
52-
public static List<EplanServerData> GetActiveEplanInstances()
53-
{
54-
EplanRemoteClient eplanRemoteClient = new EplanRemoteClient();
55-
List<EplanServerData> eplanServerDatas = new List<EplanServerData>();
56-
eplanRemoteClient.GetActiveEplanServersOnLocalMachine(
57-
out eplanServerDatas);
58-
return eplanServerDatas;
59-
}
60-
61-
private static void ExecuteActive(EplanServerData eplanServerData)
62-
{
63-
EplanRemoteClient eplanRemoteClient = new EplanRemoteClient();
64-
eplanRemoteClient.SynchronousMode = true;
65-
eplanRemoteClient.Connect("localhost",
66-
eplanServerData.ServerPort.ToString(),
67-
new TimeSpan(0, 0, 0, 5)); // 5s needed to resolve
68-
69-
eplanRemoteClient.ExecuteAction("Actionname");
70-
eplanRemoteClient.Disconnect();
71-
eplanRemoteClient.Dispose();
72-
}
73-
74-
public static List<EplanData> GetInstalledEplanInstances()
75-
{
76-
EplanFinder eplanFinder = new EplanFinder();
77-
List<EplanData> eplanVersions = new List<EplanData>();
78-
eplanFinder.GetInstalledEplanVersions(ref eplanVersions, true);
79-
return eplanVersions;
80-
}
81-
82-
private static void ExecuteInstalled(EplanData eplanData)
83-
{
84-
ProcessStartInfo startInfo = new ProcessStartInfo();
85-
startInfo.FileName = eplanData.EplanPath;
86-
87-
const string QUOTE = "\"";
88-
string arguments = string.Format("/Variant:{0}{1}{0} {2}",
89-
QUOTE, eplanData.EplanVariant, "Actionname");
90-
91-
startInfo.Arguments = arguments;
92-
Process.Start(startInfo);
93-
}
94-
}
1+
using Eplan.EplApi.RemoteClient;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
6+
namespace EPLAN_Remote_Client
7+
{
8+
internal class Program
9+
{
10+
static void Main(string[] args)
11+
{
12+
List<EplanServerData> instancesActive = GetInstances();
13+
if (instancesActive.Any())
14+
{
15+
Console.WriteLine("Start active instance...");
16+
EplanServerData eplanInstanceActive = instancesActive.OrderBy(obj => obj.EplanVersion).Last();
17+
18+
Execute(eplanInstanceActive);
19+
}
20+
else
21+
{
22+
Console.WriteLine("No active instance found.");
23+
}
24+
25+
Console.WriteLine("Execution completed.");
26+
Console.ReadKey();
27+
}
28+
29+
public static List<EplanServerData> GetInstances()
30+
{
31+
EplanRemoteClient eplanRemoteClient = new EplanRemoteClient();
32+
List<EplanServerData> eplanServerDatas = new List<EplanServerData>();
33+
eplanRemoteClient.GetActiveEplanServersOnLocalMachine(out eplanServerDatas);
34+
return eplanServerDatas;
35+
}
36+
37+
private static void Execute(EplanServerData eplanServerData)
38+
{
39+
EplanRemoteClient eplanRemoteClient = new EplanRemoteClient();
40+
eplanRemoteClient.SynchronousMode = true;
41+
eplanRemoteClient.Connect("localhost", eplanServerData.ServerPort.ToString(), new TimeSpan(0, 0, 0, 5));
42+
43+
eplanRemoteClient.ExecuteAction("ActionName");
44+
eplanRemoteClient.Disconnect();
45+
eplanRemoteClient.Dispose();
46+
}
47+
}
9548
}
Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
using System.Reflection;
2-
using System.Runtime.CompilerServices;
3-
using System.Runtime.InteropServices;
4-
5-
// Allgemeine Informationen über eine Assembly werden über die folgenden
6-
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
7-
// die einer Assembly zugeordnet sind.
8-
[assembly: AssemblyTitle("EPLAN Remote Client")]
9-
[assembly: AssemblyDescription("")]
10-
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("")]
12-
[assembly: AssemblyProduct("EPLAN Remote Client")]
13-
[assembly: AssemblyCopyright("Copyright © 2021")]
14-
[assembly: AssemblyTrademark("")]
15-
[assembly: AssemblyCulture("")]
16-
17-
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
18-
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
19-
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
20-
[assembly: ComVisible(false)]
21-
22-
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
23-
[assembly: Guid("2c14b903-c97d-4fc3-aecc-613922c8427e")]
24-
25-
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
26-
//
27-
// Hauptversion
28-
// Nebenversion
29-
// Buildnummer
30-
// Revision
31-
//
32-
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
33-
// indem Sie "*" wie unten gezeigt eingeben:
34-
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.0.0.0")]
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// Allgemeine Informationen über eine Assembly werden über die folgenden
6+
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
7+
// die einer Assembly zugeordnet sind.
8+
[assembly: AssemblyTitle("EPLAN Remote Client")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("EPLAN Remote Client")]
13+
[assembly: AssemblyCopyright("Copyright © 2021")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
18+
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
19+
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
20+
[assembly: ComVisible(false)]
21+
22+
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
23+
[assembly: Guid("2c14b903-c97d-4fc3-aecc-613922c8427e")]
24+
25+
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
26+
//
27+
// Hauptversion
28+
// Nebenversion
29+
// Buildnummer
30+
// Revision
31+
//
32+
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
33+
// indem Sie "*" wie unten gezeigt eingeben:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
12.1 MB
Binary file not shown.

0 commit comments

Comments
 (0)