This class allows you to use EPLAN functions in other processes.
            
            System.Object
   Eplan.EplApi.System.EplApplication
This example initializes and closes EPLAN.
             
    
	
		namespace Eplan.Api.Offline
{
    public partial class MainDialog : Form
    {
        //EPLAN application object
        private EplApplication m_oEplApp = new EplApplication();
        //flag for detemining if initialization has been already done
        private bool m_bIsP8AlreadyInitialized = false;
        //path to EPLAN bin folder
        private string m_strEplanBinFolder = "";
        public MainDialog(String strEplanBinFolder)
        {
            //remember oath to bin folder
            m_strEplanBinFolder = strEplanBinFolder;
            //initialize dialog components
            InitializeComponent();
        }
        //Method for handling event which fires on clicking a control.
        private void btnStart_Click(object sender, System.EventArgs e)
        {
            EPLInit();
        }
        //Method for handling event which fires when closing a form. 
        private void mainDialog_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            EPLExit();
        }
        //Method for initializing EPLAN
        private void EPLInit()
        {
            try
            {
                if (!m_bIsP8AlreadyInitialized)
                {
                    if (!String.IsNullOrEmpty(m_strEplanBinFolder))
                    {
                        m_oEplApp.EplanBinFolder = m_strEplanBinFolder;
                    }
                    m_oEplApp.Init("");
                    m_bIsP8AlreadyInitialized = true;
                }
            }
            catch (Exception)
            {
                //ToDo add an exception handling code here
            }
        }
        //Method for deinitialization EPLAN
        private void EPLExit()
        {
            try
            {
                if (m_bIsP8AlreadyInitialized)
                {
                    m_oEplApp.Exit();
                    m_bIsP8AlreadyInitialized = false;
                }
            }
            catch (Exception)
            {
                //ToDo add an exception handling code here
            }
        }
    };
}