EPLAN - a platform for cross-cutting design, covering the following sectors: electrical engineering, instrumentation, hydraulics / pneumatics and mechanics (design cabinets and wire harnesses). The open architecture and standard integration modules EPLAN can be cost-effectively integrated with a wide range of third-party solutions: mechanical design systems, ERP and PDM systems, building engineering systems, industrial plants and ships.
The use of EPLAN
• Automotive
• Mechanical Engineering
• Metallurgy
• Chemicals and Pharmaceuticals
• Food Industry
• Oil and gas
• Pipeline transportation
• Oil and gas processing
• Production of heat and electricity
• Transmission and distribution of electricity
• Railway transport
• Water supply and sanitation
• Machine
• Light industry
• Building Automation
Basic Platform Modules
• EPLAN Electric P8 - Modular and scalable solution for electrical design, automatic creation of design and working documents.
• EPLAN Fluid - software for designing air / hydro, lubrication and cooling systems, and automatically create the appropriate design and working documents
• EPLAN ProPanel - 3D design of electrical cabinets with data transmission in production. The virtual three-dimensional modeling, creation of two- and three-dimensional drawings, three-dimensional image of wired and routing schemes, the presence of templates for drilling equipment and integration with CNC machines
• EPLAN PrePlanning - software for preliminary (conceptual) design objects and generation of project documentation.
• EPLAN Engineering Center - The solution for functional design. In this module, the user touched the boundary parameters of the project, and the design itself is done automatically by the system according to certain rules.
About expansion of functional
EPLAN - a flexible platform that allows you to extend the functionality using scripts and Add-Inov. We consider only the Add-Iny as scripts (scripts) provide far less freedom of action.
Add-In - This add-on, complement and extend the basic functionality offered by EPLAN. Add-In is created using API EPLAN, which, in turn, uses and maintains dotNET 3 programming languages: Visual Basic, C ++ and C #. To create a Add-Inov is the same for all of the above languages. Information API EPLAN is in reference EPLAN API-Support (in format * .chm), supplied with the documentation.
The process of creating Add-Ina
Consider just the process of creating Add-Inov.
1. To begin with, as used dotNET environment created by the project Class Library in MS Visual Studio.
2. Next, connect the project EPLAN API library.
3. Writing initialization code Add-Ina
To register and initialize Add-Ina, our class should inherit IEplAddIn interface (for more details in the EPLAN API-Support). Create a menu item in the main menu, EPLAN and add to it one action (Action).
using Eplan.EplApi.ApplicationFramework;
using Eplan.EplApi.Gui;
namespace Test
{
public class AddInModule: IEplAddIn
{
public bool OnRegister (ref bool bLoadOnStart)
{
bLoadOnStart = true;
return true;
}
public bool OnUnregister ()
{
return true;
}
public bool OnInit ()
{
return true;
}
public bool OnInitGui ()
{
Menu OurMenu = new Menu ();
OurMenu.AddMainMenu ( "Test", Menu.MainMenuName.eMainMenuUtilities, "Information on the project", "ActionTest",
"The project name, company and date of creation", 1);
return true;
}
public bool OnExit ()
{
return true;
}
}
}
OnRegister Methods and OnUnregister invoked only once, during the first connection and removal Add-Ina respectively.
OnExit method is called when closing EPLANa.
OnInit method is invoked when loading EPLANa to initialize Add-Ina.
OnInitGui method is invoked when loading EPLANa to initialize Add-Ina and user interface.
4. Writing an action code (Action), which will be on our menu. Action (Action) should inherit IEplAction interface (for more details in the EPLAN API-Support).
using System;
using System.Windows.Forms;
using Eplan.EplApi.ApplicationFramework;
using Eplan.EplApi.DataModel;
using Eplan.EplApi.HEServices;
{
public bool OnRegister (ref string Name, ref int Ordinal)
{
Name = "ActionTest";
Ordinal = 20;
return true;
}
public bool Execute (ActionCallingContext oActionCallingContext)
{
SelectionSet Set = new SelectionSet ();
Project CurrentProject = Set.GetCurrentProject (true);
string ProjectName = CurrentProject.ProjectName;
string ProjectCompanyName = CurrentProject.Properties.PROJ_COMPANYNAME;
DateTime ProjectCreationDate = CurrentProject.Properties.PROJ_CREATIONDATE;
MessageBox.Show ( "Project Name:" + ProjectName + "\ n" + "Company name:" + ProjectCompanyName +
"\ N" + "Date of creation of the project:" + ProjectCreationDate.ToShortDateString ());
return true;
}
public void GetActionProperties (ref ActionProperties actionProperties)
{
}
}
}
namespace Test.Action_test
{
public class Action_Test: IEplAction
OnRegister our method detects Action under the specified name.
The Execute method Actiona executed when called from the EPLAN platform. In this case, the Execute method selects the current project, it reads from the three fields, namely, project name, company name and the date of creation, and then displays them in a MessageBox.
GetActionProperties method returns a description of our Actiona (only for documentation).
5. The name of the compiled DLL-libraries must follow these rules:
Eplan.EplAddIn.XXXX.dll
where XXXX - is the name of your Add-Ina
Connecting Add-Ina
To Add-In platform is connected as follows:
1. Perform "Utilities"
- «API-AddIns ...»
2. Hit the button "Download"
3. In the window that opens, select the Add-In and click the "Open"
4. Click on the "OK" button. Add-In is loaded and ready to go.
When loading Add-In initializes the menu item "Test", revealing that we see our action (Action), described in Action_Test.
Let's look at the result of the Add-Ina:
Click on the "Test" menu - "Information on the project"
EPLAN Platform provides a great basic functionality. However, sometimes action is required, not included in it. In the simplest cases, you can create and attach scripts (scripts), but if you want a deep access to the data, you must use the API, create and use the Add-Iny.
No comments:
Post a Comment