Exemple #1
0
    public void ClearSearch()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();

        oCLI.Execute("XSeShowSearchResultsAction");
        oCLI.Execute("GfDlgMgrActionIGfWind /function:DeleteAll");
    }
Exemple #2
0
    private void btnOk_Click(object sender, System.EventArgs e)
    {
        Cursor = Cursors.WaitCursor;

        CommandLineInterpreter oCLI = new CommandLineInterpreter();

        pbr.PerformStep();
        if (chkProjectcheck.Checked)
        {
            oCLI.Execute("AutomatedProjectCheck");
        }

        pbr.PerformStep();
        if (chkReport.Checked)
        {
            oCLI.Execute("reports");
        }
        pbr.PerformStep();
        pbr.Value = 0;

        Cursor = Cursors.Default;

        this.Close();

        return;
    }
    private void btnOk_Click(object sender, System.EventArgs e)
    {
        Cursor = Cursors.WaitCursor;

        CommandLineInterpreter oCLI = new CommandLineInterpreter();

        pbr.PerformStep();
        if (chkProjectcheck.Checked)
        {
            oCLI.Execute("AutomatedProjectCheck");
        }

        pbr.PerformStep();
        if (chkReport.Checked)
        {
            oCLI.Execute("reports");
        }
        pbr.PerformStep();
        pbr.Value = 0;

        Cursor = Cursors.Default;

        this.Close();

        return;
    }
Exemple #4
0
    public void Function()
    {
        string projectsPath = PathMap.SubstitutePath("$(MD_PROJECTS)");

        OpenFileDialog ofd = new OpenFileDialog();

        ofd.Filter           = "ProjectInfo.xml|ProjectInfo.xml";
        ofd.InitialDirectory = projectsPath;
        ofd.Title            = "Projekteigenschaften auswählen:";
        ofd.ValidateNames    = false;

        if (ofd.ShowDialog() == DialogResult.OK)
        {
            Progress progress = new Progress("SimpleProgress");
            progress.SetAllowCancel(false);
            progress.BeginPart(100, "");
            progress.SetTitle("Projekteigenschaften importieren");
            progress.ShowImmediately();

            CommandLineInterpreter cli = new CommandLineInterpreter();
            ActionCallingContext   acc = new ActionCallingContext();

            acc.AddParameter("TYPE", "READPROJECTINFO");
            acc.AddParameter("FILENAME", ofd.FileName);
            cli.Execute("projectmanagement", acc);

            progress.EndPart(true);

            cli.Execute("XPrjActionPropertiesEdit");
        }

        return;
    }
        /// <summary>
        /// Macrobox has to be selected in graphical editor
        /// </summary>
        private void UpdateMacro()
        {
            CommandLineInterpreter interpreter = new CommandLineInterpreter();

            interpreter.Execute("XGedUpdateMacroAction");
            interpreter.Execute("XMSelectObjectsInsideMacroBoxAction");
        }
Exemple #6
0
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();

        Progress oProgress = new Progress("EnhancedProgress");

        oProgress.SetAllowCancel(false);
        oProgress.ShowImmediately();

        oProgress.BeginPart(33, "Part 1");
        oCLI.Execute("generate /TYPE:CONNECTIONS");
        oProgress.EndPart();

        oProgress.BeginPart(33, "Part 2");
        oCLI.Execute("reports");
        oProgress.EndPart();

        oProgress.BeginPart(33, "Part 3");
        oCLI.Execute("compress /FILTERSCHEME:Standard");
        oProgress.EndPart();

        oProgress.EndPart(true);

        return;
    }
    public void PrintPagesVoid()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        string strPages = string.Empty;
        acc.AddParameter("TYPE", "PAGES");
        oCLI.Execute("selectionset", acc);
        acc.GetParameter("PAGES", ref strPages);

        Progress oProgress = new Progress("SimpleProgress");
        oProgress.SetAllowCancel(true);
        oProgress.SetAskOnCancel(true);
        oProgress.SetNeededSteps(3);
        oProgress.SetTitle("Drucken");
        oProgress.ShowImmediately();

        foreach (string Page in strPages.Split(';'))
        {
            if (!oProgress.Canceled())
            {
                acc.AddParameter("PAGENAME", Page);
                oCLI.Execute("print", acc);
            }
            else
            {
                break;
            }
        }
        oProgress.EndPart(true);

        return;
    }
    public void ChangePLCMnemonik(string DestMnemonik)
    {
        // Check target mnemonic
        if (DestMnemonik == string.Empty)
        {
            // No target mnemonic defined
            return;
        }

        // Empty clipboard
        System.Windows.Forms.Clipboard.Clear();

        // Fill clipboard
        CommandLineInterpreter oCLI = new CommandLineInterpreter();

        oCLI.Execute("GfDlgMgrActionIGfWind /function:Copy");

        MessageBox.Show("Test 1 completed!"); // This can be used for testing to monitor that the private sub ran correctly.

        // Try mnemonic exchange
        #region change mnemonik



        if (System.Windows.Forms.Clipboard.ContainsText())
        {
            sSourceText = System.Windows.Forms.Clipboard.GetText();
            if (sSourceText != string.Empty)
            {
                switch (DestMnemonik)
                {
                case "IQ":
                    //sSourceText = sSourceText.Replace("PED", "PID").Replace("PAD", "PQD").Replace("PEW", "PIW").Replace("PAW", "PQW").Replace("ED", "ID").Replace("AD", "QD").Replace("EW", "IW").Replace("AW", "QW").Replace("EB", "IB").Replace("AB", "QB").Replace("E", "I").Replace("A", "Q");
                    sSourceText = sSourceText.Replace("E", "I").Replace("A", "Q");
                    break;

                case "EA":
                    //sSourceText = sSourceText.Replace("PID", "PED").Replace("PQD", "PAD").Replace("PIW", "PEW").Replace("PQW", "PAW").Replace("ID", "ED").Replace("QD", "AD").Replace("IW", "EW").Replace("QW", "AW").Replace("IB", "EB").Replace("QB", "AB").Replace("I", "E").Replace("Q", "A");
                    sSourceText = sSourceText.Replace("I", "E").Replace("Q", "A");
                    break;

                default:
                    return;
                }

                try
                {
                    System.Windows.Forms.Clipboard.SetText(sSourceText);
                    oCLI.Execute("GfDlgMgrActionIGfWind /function:Paste");
                }
                catch (System.Exception ex)
                {
                    MessageBox.Show(ex.Message, "Error...", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
        #endregion
    }
Exemple #9
0
    public void ChangePLCMnemonik(string DestMnemonik)
    {
        //Prüfe Zielmnemonik
        if (DestMnemonik == string.Empty)
        {
            //keine Zielmnemonik definiert
            return;
        }

        //Zwischenablage leeren
        System.Windows.Forms.Clipboard.Clear();

        //Zwischenablage füllen
        CommandLineInterpreter oCLI = new CommandLineInterpreter();

        oCLI.Execute("GfDlgMgrActionIGfWind /function:Copy");

        //Mnemonik-Tausch versuchen
        #region change mnemonik

        if (System.Windows.Forms.Clipboard.ContainsText())
        {
            sSourceText = System.Windows.Forms.Clipboard.GetText();
            if (sSourceText != string.Empty)
            {
                switch (DestMnemonik)
                {
                case "IQ":
                    //sSourceText = sSourceText.Replace("PED", "PID").Replace("PAD", "PQD").Replace("PEW", "PIW").Replace("PAW", "PQW").Replace("ED", "ID").Replace("AD", "QD").Replace("EW", "IW").Replace("AW", "QW").Replace("EB", "IB").Replace("AB", "QB").Replace("E", "I").Replace("A", "Q");
                    sSourceText = sSourceText.Replace("E", "I").Replace("A", "Q");
                    break;

                case "EA":
                    //sSourceText = sSourceText.Replace("PID", "PED").Replace("PQD", "PAD").Replace("PIW", "PEW").Replace("PQW", "PAW").Replace("ID", "ED").Replace("QD", "AD").Replace("IW", "EW").Replace("QW", "AW").Replace("IB", "EB").Replace("QB", "AB").Replace("I", "E").Replace("Q", "A");
                    sSourceText = sSourceText.Replace("I", "E").Replace("Q", "A");
                    break;

                default:
                    return;

                    break;
                }

                try
                {
                    System.Windows.Forms.Clipboard.SetText(sSourceText);
                    oCLI.Execute("GfDlgMgrActionIGfWind /function:Paste");
                }
                catch (System.Exception ex)
                {
                    MessageBox.Show(ex.Message, "Fehler", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
        #endregion
    }
Exemple #10
0
    public void Function()
    {
        CommandLineInterpreter cli = new CommandLineInterpreter();

        cli.Execute("XMsgActionStartVerification");
        cli.Execute("reports");
        cli.Execute("Actionname");

        return;
    }
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();

        oCLI.Execute("XMsgActionStartVerification");
        oCLI.Execute("reports");
        oCLI.Execute("Actionname");

        return;
    }
Exemple #12
0
    private void btnOK_Click(object sender, System.EventArgs e)
    {
        //remember text in the clipboard
        if (System.Windows.Forms.Clipboard.ContainsText())
        {
            savedText = System.Windows.Forms.Clipboard.GetText();
        }
        //https://suplanus.de/changeplcmnemonics/
        //clear clipboard
        System.Windows.Forms.Clipboard.Clear();
        //copy text
        CommandLineInterpreter oCLI = new CommandLineInterpreter();

        oCLI.Execute("GfDlgMgrActionIGfWind /function:Copy");
        if (System.Windows.Forms.Clipboard.ContainsText())
        {
            sSourceText = System.Windows.Forms.Clipboard.GetText();
            if (sSourceText != string.Empty)
            {
                //Replace
                if (chkboxMatch.Checked | ReplaceTxtBox.Text == "") //Match case or empty
                {
                    sSourceText = sSourceText.Replace(FindTxtBox.Text, ReplaceTxtBox.Text);
                }
                else
                {
                    //Ignore case
                    sSourceText = Regex.Replace(sSourceText, FindTxtBox.Text, ReplaceTxtBox.Text, RegexOptions.IgnoreCase);
                }
                //Change case
                if (rbtnUpper.Checked)
                {
                    sSourceText = sSourceText.ToUpper();
                }
                else if (rbtnLower.Checked)
                {
                    sSourceText = sSourceText.ToLower();
                }

                try {
                    System.Windows.Forms.Clipboard.SetText(sSourceText);
                    oCLI.Execute("GfDlgMgrActionIGfWind /function:Paste");  //Paste text
                    if (savedText != string.Empty)
                    {
                        System.Windows.Forms.Clipboard.SetText(savedText);  //Put saved text in clipboard
                    }
                } catch (System.Exception ex) {
                    MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
    }
    public void ChangePLCMnemonik(string DestMnemonik)
    {
        //Prüfe Zielmnemonik
        if (DestMnemonik == string.Empty)
        {
            //keine Zielmnemonik definiert
            return;
        }

        //Zwischenablage leeren
        System.Windows.Forms.Clipboard.Clear();

        //Zwischenablage füllen
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        oCLI.Execute("GfDlgMgrActionIGfWind /function:Copy");

        //Mnemonik-Tausch versuchen
        #region change mnemonik

        if (System.Windows.Forms.Clipboard.ContainsText())
        {
            sSourceText = System.Windows.Forms.Clipboard.GetText();
            if (sSourceText != string.Empty)
            {
                switch (DestMnemonik)
                {
                    case "IQ":
                        //sSourceText = sSourceText.Replace("PED", "PID").Replace("PAD", "PQD").Replace("PEW", "PIW").Replace("PAW", "PQW").Replace("ED", "ID").Replace("AD", "QD").Replace("EW", "IW").Replace("AW", "QW").Replace("EB", "IB").Replace("AB", "QB").Replace("E", "I").Replace("A", "Q");
                        sSourceText = sSourceText.Replace("E", "I").Replace("A", "Q");
                        break;
                    case "EA":
                        //sSourceText = sSourceText.Replace("PID", "PED").Replace("PQD", "PAD").Replace("PIW", "PEW").Replace("PQW", "PAW").Replace("ID", "ED").Replace("QD", "AD").Replace("IW", "EW").Replace("QW", "AW").Replace("IB", "EB").Replace("QB", "AB").Replace("I", "E").Replace("Q", "A");
                        sSourceText = sSourceText.Replace("I", "E").Replace("Q", "A");
                        break;
                    default:
                        return;
                        break;
                }

                try
                {
                    System.Windows.Forms.Clipboard.SetText(sSourceText);
                    oCLI.Execute("GfDlgMgrActionIGfWind /function:Paste");
                }
                catch (System.Exception ex)
                {
                    MessageBox.Show(ex.Message, "Fehler", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
        #endregion
    }
Exemple #14
0
    public void PagePdfVoid()
    {
        FolderBrowserDialog    fbd  = new FolderBrowserDialog();
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext   acc  = new ActionCallingContext();

        if (fbd.ShowDialog() != DialogResult.OK)
        {
            return;
        }

        Progress oProgress = new Progress("SimpleProgress");

        oProgress.SetAllowCancel(true);
        oProgress.SetAskOnCancel(true);
        oProgress.BeginPart(100, "");
        oProgress.ShowImmediately();

        try
        {
            string strPages = string.Empty;
            acc.AddParameter("TYPE", "PAGES");
            oCLI.Execute("selectionset", acc);
            acc.GetParameter("PAGES", ref strPages);

            foreach (string CurrentPage in strPages.Split(';'))
            {
                if (!oProgress.Canceled())
                {
                    acc.AddParameter("TYPE", "PDFPAGESSCHEME");
                    acc.AddParameter("PAGENAME", CurrentPage);
                    acc.AddParameter("EXPORTFILE", fbd.SelectedPath + @"\" + CurrentPage);
                    acc.AddParameter("EXPORTSCHEME", "EPLAN_default_value");
                    oCLI.Execute("export", acc);
                }
                else
                {
                    oProgress.EndPart(true);
                    return;
                }
            }
            Process.Start(fbd.SelectedPath);
            oProgress.EndPart(true);
        }
        catch (System.Exception ex)
        {
            oProgress.EndPart(true);
            MessageBox.Show("Error", ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
        }
    }
    public void PagePdfVoid()
    {
        FolderBrowserDialog fbd = new FolderBrowserDialog();
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        if (fbd.ShowDialog() != DialogResult.OK)
        {
            return;
        }

        Progress oProgress = new Progress("SimpleProgress");
        oProgress.SetAllowCancel(true);
        oProgress.SetAskOnCancel(true);
        oProgress.BeginPart(100, "");
        oProgress.ShowImmediately();

        try
        {
            string strPages = string.Empty;
            acc.AddParameter("TYPE", "PAGES");
            oCLI.Execute("selectionset", acc);
            acc.GetParameter("PAGES", ref strPages);

            foreach (string CurrentPage in strPages.Split(';'))
            {
                if (!oProgress.Canceled())
                {
                    acc.AddParameter("TYPE", "PDFPAGESSCHEME");
                    acc.AddParameter("PAGENAME", CurrentPage);
                    acc.AddParameter("EXPORTFILE", fbd.SelectedPath + @"\" + CurrentPage);
                    acc.AddParameter("EXPORTSCHEME", "EPLAN_default_value");
                    oCLI.Execute("export", acc);
                }
                else
                {
                    oProgress.EndPart(true);
                    return;
                }
            }
            Process.Start(fbd.SelectedPath);
            oProgress.EndPart(true);
        }
        catch (System.Exception ex)
        {
            oProgress.EndPart(true);
            MessageBox.Show("Error", ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
        }
    }
Exemple #16
0
    private void SetLanguageGui_Load(object sender, System.EventArgs e)
    {
        string ActionReturnParameterValue = string.Empty;

        // Languagelist
        oCLI.Execute("GetProjectLanguages", acc);
        acc.GetParameter("LANGUAGELIST", ref ActionReturnParameterValue);
        string[] ProjectLanguages = ActionReturnParameterValue.Split(';');

        // VariableLanguage
        oCLI.Execute("GetVariableLanguage", acc);
        acc.GetParameter("LANGUAGELIST", ref ActionReturnParameterValue);
        string VariableLanguage = ActionReturnParameterValue;

        // Add languages
        foreach (string CurrentLanguage in ProjectLanguages)
        {
            if (CurrentLanguage != "")
            {
                ListViewItem liviItem = new ListViewItem();

                // Check if current language
                if (CurrentLanguage.Equals(VariableLanguage))
                {
                    liviItem.Selected = true;
                }

                liviItem.Text = CurrentLanguage;

                // LanguageMapping
                foreach (string line in EplanLanguageList)
                {
                    if (line.StartsWith(CurrentLanguage))
                    {
                        if (line.Split(';').Length > 1)
                        {
                            liviItem.SubItems.Add(line.Split(';')[1]);
                        }
                    }
                }
                liviLanguages.Items.Add(liviItem);
            }
        }

        // Sort & resize
        liviLanguages.Sorting = SortOrder.Ascending;
        liviLanguages.Sort();
    }
Exemple #17
0
    public void SelectProjectLanguage_Load(object sender, System.EventArgs e)
    {
        // Add all EPLAN languages
        AddLanguages();

        // Choose which language-type
        liviLanguages.SuspendLayout();
        string ActionReturnParameterValue = string.Empty;

        switch (this.Tag.ToString())
        {
        case "Project":
            oCLI.Execute("GetProjectLanguages", acc);
            break;

        case "Display":
            oCLI.Execute("GetDisplayLanguages", acc);
            break;

        default:
            this.Tag = "FALSE";
            this.Close();
            return;
        }
        acc.GetParameter("LANGUAGELIST", ref ActionReturnParameterValue);

        // Add Languages
        string[] ProjectLanguages = ActionReturnParameterValue.Split(';');
        foreach (string language in ProjectLanguages)
        {
            foreach (string allLanguages in aryLanguages)
            {
                string[] liviValues = allLanguages.Split(';');
                if (liviValues[0].Equals(language))
                {
                    ListViewItem livi = new ListViewItem();
                    livi.Text = liviValues[0];
                    livi.SubItems.Add(liviValues[1]);
                    liviLanguages.Items.Add(livi);
                    break;
                }
            }
        }

        liviLanguages.Select();
        liviLanguages.Items[0].Selected = true;
        liviLanguages.ResumeLayout();
    }
Exemple #18
0
    public void MyEventHandlerFunction(IEventParameter iEventParameter)
    {
        try
        {
            EventParameterString oEventParameterString = new EventParameterString(iEventParameter);
            string sProjectname = oEventParameterString.String;

            //Projekt Ordner ermitteln
            var    suffix         = ".elk";
            string sProjectFolder = sProjectname.Substring(0, sProjectname.Length - suffix.Length);
            sProjectFolder = sProjectFolder + ".edb";

            //Wenn Makroprojekt, dann abbrechen
            string sProjectart = string.Empty;
            GetProjectProperty(sProjectFolder, 10902, "de_DE", out sProjectart);
            if (sProjectart == "2")
            {
                return;
            }

            //Einstellungen durchgehen
            Settings oSettings = new Settings();
            for (int i = 1; i <= 5; i++)
            {
                if (i == 2)
                {
                    continue; // Projektgruppe 2 auslassen, da diese für Makroprojekte vorgesehen ist
                }
                string sProjectgroup = oSettings.GetStringSetting(SettingsPath, i);
                if (sProjectgroup == "frei")
                {
                    //Einstellung setzen
                    oSettings.SetStringSetting(SettingsPath, sProjectname, i);

                    //Projekteinstellung der Projektgruppe setzen
                    ActionCallingContext   acctranslate = new ActionCallingContext();
                    CommandLineInterpreter CLItranslate = new CommandLineInterpreter();
                    acctranslate.AddParameter("Project", sProjectname);
                    acctranslate.AddParameter("set", "SettingsMasterDialog.ProjectGroup.ColorMode");
                    acctranslate.AddParameter("value", i.ToString());
                    acctranslate.AddParameter("index", "0");
                    CLItranslate.Execute("XAfActionSettingProject", acctranslate);

                    //Schleife verlassen
                    break;
                }
            }
        }
        catch (InvalidCastException exc)
        {
            new Decider().Decide(EnumDecisionType.eOkDecision,
                                 exc.Message,
                                 "OnPostOpenProject, Fehler",
                                 EnumDecisionReturn.eOK,
                                 EnumDecisionReturn.eOK,
                                 string.Empty,
                                 false,
                                 EnumDecisionIcon.eFATALERROR);
        }
    }
    public void SetSortCodeAction()
    {
        //Use a Command Line Interpreter to call the Action
        CommandLineInterpreter CLI = new CommandLineInterpreter();

        Eplan.EplApi.Base.Settings set = new Eplan.EplApi.Base.Settings();
        if(!set.ExistSetting("USER.SCRIPTS.SORTCODE"))
        {
            bool bOk = set.AddNumericSetting("USER.SCRIPTS.SORTCODE",  new int[] { 0 },
                new Range[] { new Range { FromValue = 0, ToValue = 32768}}, "Sort code setting", new int[] { 0 },
                ISettings.CreationFlag.Insert);
        }

        int index = set.GetNumericSetting("USER.SCRIPTS.SORTCODE", 0);

        ActionCallingContext ctx1 = new ActionCallingContext();
        ctx1.AddParameter("propertyID","20809"); //Sort code
        ctx1.AddParameter("propertyIndex","0");
        ctx1.AddParameter("propertyValue", index.ToString());
        CLI.Execute("XEsSetPropertyAction", ctx1);

        set.SetNumericSetting("USER.SCRIPTS.SORTCODE", ++index, 0);

        return;
    }
    //Gesamtes Project als PDF ausgeben
    public void PDFexport(string sZielDatei)
    {
        //Progressbar ein
        Eplan.EplApi.Base.Progress oProgress = new Eplan.EplApi.Base.Progress("SimpleProgress");
        oProgress.ShowImmediately();

        ActionCallingContext pdfContext = new ActionCallingContext();

        pdfContext.AddParameter("type", "PDFPROJECTSCHEME"); //PDFPROJECTSCHEME = Project im PDF-Format exportieren
        //pdfContext.AddParameter("exportscheme", "NAME_SCHEMA"); //verwendetes Schema
        pdfContext.AddParameter("exportfile", sZielDatei);   //Name export.Project, Vorgabewert: Projectname
        pdfContext.AddParameter("exportmodel", "0");         //0 = keine Modelle ausgeben
        pdfContext.AddParameter("blackwhite", "1");          //1 = PDF wird schwarz-weiss
        pdfContext.AddParameter("useprintmargins", "1");     //1 = Druckränder verwenden
        pdfContext.AddParameter("readonlyexport", "2");      //1 = PDF wird schreibgeschützt
        pdfContext.AddParameter("usesimplelink", "1");       //1 = einfache Sprungfunktion
        pdfContext.AddParameter("usezoomlevel", "1");        //Springen in Navigationsseiten
        pdfContext.AddParameter("fastwebview", "1");         //1 = schnelle Web-Anzeige
        pdfContext.AddParameter("zoomlevel", "1");           //wenn USEZOOMLEVEL auf 1 dann hier Zoomstufe in mm

        CommandLineInterpreter cmdLineItp = new CommandLineInterpreter();

        cmdLineItp.Execute("export", pdfContext);

        //'Progressbar aus
        oProgress.EndPart(true);

        return;
    }
    public void Function()
    {
        BaseException bexAssert =
            new BaseException("Assert", MessageLevel.Assert);
        bexAssert.FixMessage();

        BaseException bexError =
            new BaseException("Error", MessageLevel.Error);
        bexError.FixMessage();

        BaseException bexFatalError =
            new BaseException("FatalError", MessageLevel.FatalError);
        bexFatalError.FixMessage();

        BaseException bexMessage =
            new BaseException("Message", MessageLevel.Message);
        bexMessage.FixMessage();

        BaseException bexTrace =
            new BaseException("Trace", MessageLevel.Trace);
        bexTrace.FixMessage();

        BaseException bexWarning =
            new BaseException("Warning", MessageLevel.Warning);
        bexWarning.FixMessage();

        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        oCLI.Execute("SystemErrDialog");

        return;
    }
Exemple #22
0
    public void Function()
    {
        CommandLineInterpreter cli = new CommandLineInterpreter();

        cli.Execute("reports");
        return;
    }
Exemple #23
0
    private void ExecutePDFExport(string projectFullPath)
    {
        EnumDecisionReturn result = MessageBoxShow(EnumDecisionType.eYesNoDecision, string.Format("Do you want to create PDF for {0}?", projectFullPath), "PDF-Export", EnumDecisionReturn.eYES, EnumDecisionIcon.eQUESTION);

        if (result == EnumDecisionReturn.eYES)
        {
            Progress oProgress = new Progress("SimpleProgress");
            oProgress.SetAllowCancel(true);
            oProgress.SetAskOnCancel(true);
            oProgress.BeginPart(100, "");
            oProgress.ShowImmediately();

            CommandLineInterpreter oCLI = new CommandLineInterpreter();
            ActionCallingContext   acc  = new ActionCallingContext();

            acc.AddParameter("TYPE", "PDFPROJECTSCHEME");
            acc.AddParameter("PROJECTNAME", projectFullPath);
            acc.AddParameter("EXPORTFILE", string.Format("{0}\\EPLANScript\\{1}_{2}.pdf", Environment.GetFolderPath(Environment.SpecialFolder.Desktop), PathMap.SubstitutePath("$(PROJECTNAME)"), DateTime.Now.ToString("yyMMdd.HHmmssfff")));
            acc.AddParameter("EXPORTSCHEME", "EPLAN_default_value");

            oCLI.Execute("export", acc);

            oProgress.EndPart(true);
        }

        return;
    }
Exemple #24
0
    public void Function()
    {
        Eplan.EplApi.Base.BaseException bexAssert = new BaseException("Assert", MessageLevel.Assert);
        bexAssert.FixMessage();

        Eplan.EplApi.Base.BaseException bexError = new BaseException("Error", MessageLevel.Error);
        bexError.FixMessage();

        Eplan.EplApi.Base.BaseException bexFatalError = new BaseException("FatalError", MessageLevel.FatalError);
        bexFatalError.FixMessage();

        Eplan.EplApi.Base.BaseException bexMessage = new BaseException("Message", MessageLevel.Message);
        bexMessage.FixMessage();

        Eplan.EplApi.Base.BaseException bexTrace = new BaseException("Trace", MessageLevel.Trace);
        bexTrace.FixMessage();

        Eplan.EplApi.Base.BaseException bexWarning = new BaseException("Warning", MessageLevel.Warning);
        bexWarning.FixMessage();

        CommandLineInterpreter oCLI = new CommandLineInterpreter();

        oCLI.Execute("SystemErrDialog");

        return;
    }
    private void btnOk_Click(object sender, System.EventArgs e)
    {
        oCLI.Execute(txtAction.Text);
        this.Close();

        return;
    }
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext   acc  = new ActionCallingContext();

        string strPages = string.Empty;

        acc.AddParameter("TYPE", "PAGES");

        oCLI.Execute("selectionset", acc);

        acc.GetParameter("PAGES", ref strPages);

        string[] strPagesCount = strPages.Split(';');
        int      intPagesCount = strPagesCount.Length;

        string strProjectname = PathMap.SubstitutePath("$(PROJECTNAME)");

        MessageBox.Show("Anzahl markierter Seiten:\n"
                        + "►►► " + intPagesCount.ToString() + " ◄◄◄",
                        "Markierte Seiten [" + strProjectname + "]",
                        MessageBoxButtons.OK,
                        MessageBoxIcon.Information);

        return;
    }
    //Gesamtes Projekt als PXF ausgeben
    public void PXFexport(string sFilename)
    {
        //Progressbar ein
        Progress oProgress = new Progress("SimpleProgress");

        oProgress.SetTitle("Documentation-Tool");
        oProgress.SetActionText("Projektdaten exportieren");
        oProgress.ShowImmediately();
        Application.DoEvents();         // Screen aktualisieren

        ActionCallingContext pxfContext = new ActionCallingContext();

        pxfContext.AddParameter("TYPE", "PXFPROJECT");
        pxfContext.AddParameter("EXPORTFILE", sFilename);
        pxfContext.AddParameter("EXPORTMASTERDATA", "0");         //Stammdaten mit exportieren (Standard = 1(Ja)
        pxfContext.AddParameter("EXPORTCONNECTIONS", "0");        //Verbindungen mit exportieren (Standard = 0(Nein)

        CommandLineInterpreter cmdLineItp = new CommandLineInterpreter();

        cmdLineItp.Execute("export", pxfContext);

        //Progressbar aus
        oProgress.EndPart(true);

        return;
    }
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        string strPages = string.Empty;

        acc.AddParameter("TYPE", "PAGES");

        oCLI.Execute("selectionset", acc);

        acc.GetParameter("PAGES", ref strPages);

        string[] strPagesCount = strPages.Split(';');
        int intPagesCount = strPagesCount.Length;

        string strProjectname = PathMap.SubstitutePath("$(PROJECTNAME)");

        MessageBox.Show("Anzahl markierter Seiten:\n"
            + "►►► " + intPagesCount.ToString() + " ◄◄◄",
            "Markierte Seiten [" + strProjectname + "]",
            MessageBoxButtons.OK,
            MessageBoxIcon.Information);

        return;
    }
Exemple #29
0
    //Output entire project as a PDF
    public void PDFexport(string sZielDatei)
    {
        //Progressive on
        Eplan.EplApi.Base.Progress oProgress = new Eplan.EplApi.Base.Progress("SimpleProgress");
        oProgress.ShowImmediately();

        ActionCallingContext pdfContext = new ActionCallingContext();

        pdfContext.AddParameter("type", "PDFPROJECTSCHEME");    //PDFPROJECTSCHEME = Export project in PDF format
        pdfContext.AddParameter("exportscheme", "NAME_SCHEMA"); //used scheme
        pdfContext.AddParameter("exportfile", sZielDatei);      //Name export.Project, default value: Projectname
        pdfContext.AddParameter("exportmodel", "0");            //0 = do not spend any models
        pdfContext.AddParameter("blackwhite", "1");             //1 = PDF turns black and white
        pdfContext.AddParameter("useprintmargins", "1");        //1 = use printing margins
        pdfContext.AddParameter("readonlyexport", "2");         //1 = PDF becomes read - only
        pdfContext.AddParameter("usesimplelink", "1");          //1 = simple jump function
        pdfContext.AddParameter("usezoomlevel", "1");           //Jump in navigation pages
        pdfContext.AddParameter("fastwebview", "1");            //1 = fast web ad
        pdfContext.AddParameter("zoomlevel", "1");              //if USEZOOMLEVEL to 1 then here zoom level in mm

        CommandLineInterpreter cmdLineItp = new CommandLineInterpreter();

        cmdLineItp.Execute("export", pdfContext);

        //Progressbar off
        oProgress.EndPart(true);

        return;
    }
    public void Function()
    {
        string strFullProjectname = PathMap.SubstitutePath("$(P)");


        string projectsPath = PathMap.SubstitutePath("$(MD_PROJECTS)");
        string projectName  = PathMap.SubstitutePath("$(PROJECTNAME)");

        string date = DateTime.Now.ToString("yyyy-MM-dd");
        string time = DateTime.Now.ToString("HH-mm-ss");

        string backupDirectory    = Path.Combine(projectsPath, "Backup");
        string backupFileName     = projectName + "_" + date + "_" + time + ".zw1";
        string backupFullFileName = Path.Combine(backupDirectory, backupFileName);

        if (!Directory.Exists(backupDirectory))
        {
            Directory.CreateDirectory(backupDirectory);
        }

        Progress progress = new Progress("SimpleProgress");

        progress.SetAllowCancel(true);
        progress.SetAskOnCancel(true);
        progress.BeginPart(100, "");
        progress.SetTitle("Backup");
        progress.ShowImmediately();

        if (!progress.Canceled())
        {
            CommandLineInterpreter cli = new CommandLineInterpreter();
            ActionCallingContext   acc = new ActionCallingContext();

            acc.AddParameter("BACKUPAMOUNT", "BACKUPAMOUNT_ALL");
            acc.AddParameter("BACKUPMEDIA", "DISK");
            acc.AddParameter("BACKUPMETHOD", "BACKUP");
            acc.AddParameter("COMPRESSPRJ", "1");
            acc.AddParameter("INCLEXTDOCS", "1");
            acc.AddParameter("INCLIMAGES", "1");
            acc.AddParameter("ARCHIVENAME", backupFileName);
            acc.AddParameter("DESTINATIONPATH", backupDirectory);
            acc.AddParameter("TYPE", "PROJECT");

            cli.Execute("backup", acc);
        }

        progress.EndPart(true);

        MessageBox.Show(
            "Backup wurde erfolgreich erstellt:" +
            Environment.NewLine +
            backupFullFileName,
            "Hinweis",
            MessageBoxButtons.OK,
            MessageBoxIcon.Information
            );

        return;
    }
Exemple #31
0
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();

        oCLI.Execute("reports");

        return;
    }
Exemple #32
0
    public void XPamTranslateDatabaseActionFunction()
    {
        CommandLineInterpreter oCli = new CommandLineInterpreter();
        ActionCallingContext   acc  = new ActionCallingContext();

        acc.AddParameter("_cmdline", "XPamTranslateDatabaseAction");
        oCli.Execute("XPamTranslateDatabaseAction", acc);
    }
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();

        oCLI.Execute("reports");

        return;
    }
Exemple #34
0
    public static void OpenProject(string projectname)
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext   acc  = new ActionCallingContext();

        acc.AddParameter("PROJECTNAME", projectname);
        oCLI.Execute("EDIT", acc);
    }
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();

        oCLI.Execute("XGedUpdateMacroAction");

        return;
    }
    public void Function()
    {
        string strProjectpath =
            PathMap.SubstitutePath("$(PROJECTPATH)");
        string strProjectname     = PathMap.SubstitutePath("$(PROJECTNAME)");
        string strFullProjectname = PathMap.SubstitutePath("$(P)");

        string strDate            = DateTime.Now.ToString("yyyy-MM-dd");
        string strTime            = DateTime.Now.ToString("hh-mm-ss");
        string strBackupDirectory = strProjectpath + @"\Backup\";
        string strBackupFilename  = strProjectname + "_Backup_"
                                    + strDate + "_" + strTime;

        if (!System.IO.Directory.Exists(strBackupDirectory))
        {
            System.IO.Directory.CreateDirectory(strBackupDirectory);
        }

        Progress oProgress = new Progress("SimpleProgress");

        oProgress.SetAllowCancel(true);
        oProgress.SetAskOnCancel(true);
        oProgress.BeginPart(100, "");
        oProgress.SetTitle("Backup");
        oProgress.ShowImmediately();

        if (!oProgress.Canceled())
        {
            CommandLineInterpreter oCLI = new CommandLineInterpreter();
            ActionCallingContext   acc  = new ActionCallingContext();

            acc.AddParameter("BACKUPMEDIA", "DISK");
            acc.AddParameter("ARCHIVENAME", strBackupFilename);
            acc.AddParameter("BACKUPMETHOD", "BACKUP");
            acc.AddParameter("COMPRESSPRJ", "1");
            acc.AddParameter("INCLEXTDOCS", "1");
            acc.AddParameter("BACKUPAMOUNT", "BACKUPAMOUNT_ALL");
            acc.AddParameter("INCLIMAGES", "1");
            acc.AddParameter("LogMsgActionDone", "true");
            acc.AddParameter("DESTINATIONPATH", strBackupDirectory);
            acc.AddParameter("PROJECTNAME", strFullProjectname);
            acc.AddParameter("TYPE", "PROJECT");

            oCLI.Execute("backup", acc);
        }

        oProgress.EndPart(true);

        MessageBox.Show(
            "Backup was created successfully:\n"
            + strBackupFilename,
            "Note",
            MessageBoxButtons.OK,
            MessageBoxIcon.Information
            );

        return;
    }
Exemple #37
0
        public static void ImportPrjSettings(string projectname, string settingsFile)
        {
            CommandLineInterpreter oCLI = new CommandLineInterpreter();
            ActionCallingContext   acc  = new ActionCallingContext();

            acc.AddParameter("XMLFile", settingsFile);
            acc.AddParameter("Project", projectname);
            oCLI.Execute("XSettingsImport", acc);
        }
        /// <summary>
        /// The action XAfActionSettingProject is only available in version 2.3 and higher
        /// </summary>
        /// <param name="setting"></param>
        /// <param name="value"></param>
        private void SetProjectSetting(string setting, string value)
        {
            CommandLineInterpreter interpreter = new CommandLineInterpreter();
            ActionCallingContext   XAfActionSettingProjectContext = new ActionCallingContext();

            XAfActionSettingProjectContext.AddParameter("set", setting);
            XAfActionSettingProjectContext.AddParameter("value", value);
            interpreter.Execute("XAfActionSettingProject", XAfActionSettingProjectContext);
        }
    public void Function()
    {
        string strProjectpath =
            PathMap.SubstitutePath("$(PROJECTPATH)");
        string strProjectname = PathMap.SubstitutePath("$(PROJECTNAME)");
        string strFullProjectname = PathMap.SubstitutePath("$(P)");

        string strDate = DateTime.Now.ToString("yyyy-MM-dd");
        string strTime = DateTime.Now.ToString("hh-mm-ss");
        string strBackupDirectory = strProjectpath + @"\Backup\";
        string strBackupFilename = strProjectname + "_Backup_"
            + strDate + "_" + strTime;

        if (!System.IO.Directory.Exists(strBackupDirectory))
        {
            System.IO.Directory.CreateDirectory(strBackupDirectory);
        }

        Progress oProgress = new Progress("SimpleProgress");
        oProgress.SetAllowCancel(true);
        oProgress.SetAskOnCancel(true);
        oProgress.BeginPart(100, "");
        oProgress.SetTitle("Backup");
        oProgress.ShowImmediately();

        if (!oProgress.Canceled())
        {
            CommandLineInterpreter oCLI = new CommandLineInterpreter();
            ActionCallingContext acc = new ActionCallingContext();

            acc.AddParameter("BACKUPMEDIA", "DISK");
            acc.AddParameter("ARCHIVENAME", strBackupFilename);
            acc.AddParameter("BACKUPMETHOD", "BACKUP");
            acc.AddParameter("COMPRESSPRJ", "1");
            acc.AddParameter("INCLEXTDOCS", "1");
            acc.AddParameter("BACKUPAMOUNT", "BACKUPAMOUNT_ALL");
            acc.AddParameter("INCLIMAGES", "1");
            acc.AddParameter("LogMsgActionDone", "true");
            acc.AddParameter("DESTINATIONPATH", strBackupDirectory);
            acc.AddParameter("PROJECTNAME", strFullProjectname);
            acc.AddParameter("TYPE", "PROJECT");

            oCLI.Execute("backup", acc);
        }

        oProgress.EndPart(true);

        MessageBox.Show(
            "Backup wurde erfolgreich erstellt:\n"
            + strBackupFilename,
            "Hinweis",
            MessageBoxButtons.OK,
            MessageBoxIcon.Information
            );

        return;
    }
    public void ToUpper()
    {
        string sSourceText = string.Empty;
        string sReturnText = string.Empty;
        string EplanCRLF   = "¶";

        //Clear le clipboard
        System.Windows.Forms.Clipboard.Clear();

        //Copie le texte
        CommandLineInterpreter oCLI = new CommandLineInterpreter();

        oCLI.Execute("GfDlgMgrActionIGfWind /function:SelectAll");    // Alles markieren
        oCLI.Execute("GfDlgMgrActionIGfWind /function:Copy");         // Kopieren

        if (System.Windows.Forms.Clipboard.ContainsText())
        {
            sSourceText = System.Windows.Forms.Clipboard.GetText();
            if (sSourceText != string.Empty)
            {
                if (!IsAllUpper(sSourceText))
                {
                    sReturnText = sSourceText.ToUpper();
                }
                else
                {
                    /*if (IsAllLower(sSourceText))
                     * {
                     *      sReturnText = UppercaseFirst(sSourceText.ToLower());
                     * }
                     * else
                     * {*/
                    sReturnText = sSourceText.ToLower();
                    //}
                }
                System.Windows.Forms.Clipboard.SetText(sReturnText);
                oCLI.Execute("GfDlgMgrActionIGfWind /function:SelectAll");   // Alles markieren
                oCLI.Execute("GfDlgMgrActionIGfWindDelete");                 // Löschen
                oCLI.Execute("GfDlgMgrActionIGfWind /function:Paste");       // Einfügen
            }
        }

        return;
    }
    public void InsertPageMacroVoid()
    {
        string strFilename = @"C:\test.emp";

        ActionCallingContext oAcc = new ActionCallingContext();
        CommandLineInterpreter oCLI = new CommandLineInterpreter();

        oAcc.AddParameter("filename", strFilename);
        oCLI.Execute("XMInsertPageMacro", oAcc);
    }
    public void MultilanguageToolExamples_Get_Void()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();
        string ActionReturnParameterValue = string.Empty;
        string strMessage = string.Empty;

        #region GetProjectLanguages
        oCLI.Execute("GetProjectLanguages", acc);
        acc.GetParameter("LANGUAGELIST", ref ActionReturnParameterValue);
        string[] ProjectLanguages = ActionReturnParameterValue.Split(';');

        foreach (string s in ProjectLanguages)
        {
            strMessage = strMessage + s + "\n";
        }
        MessageBox.Show(strMessage, "GetProjectLanguages");
        strMessage = string.Empty;
        #endregion

        #region GetDisplayLanguages
        oCLI.Execute("GetDisplayLanguages", acc);
        acc.GetParameter("LANGUAGELIST", ref ActionReturnParameterValue);
        string[] DisplayLanguages = ActionReturnParameterValue.Split(';');

        foreach(string s in DisplayLanguages)
        {
            strMessage = strMessage + s + "\n";
        }
        MessageBox.Show(strMessage, "GetDisplayLanguages");
        strMessage = string.Empty;
        #endregion

        #region GetVariableLanguage
        oCLI.Execute("GetVariableLanguage", acc);
        acc.GetParameter("LANGUAGELIST", ref ActionReturnParameterValue);
        string VariableLanguage = ActionReturnParameterValue;
        strMessage = strMessage + VariableLanguage + "\n";
        MessageBox.Show(strMessage, "GetVariableLanguage");
        strMessage = string.Empty;
        #endregion
    }
    public void Function(int SET)
    {
        try
        {
            string strScripts =
                PathMap.SubstitutePath("$(MD_SCRIPTS)" + @"\");
            string strProject = PathMap.SubstitutePath("$(P)");
            string strMessage = string.Empty;

            CommandLineInterpreter oCLI = new CommandLineInterpreter();
            ActionCallingContext acc = new ActionCallingContext();
            acc.AddParameter("Project", strProject);

            switch (SET)
            {
                case 1:
                    strMessage = "[Wie gezeichnet]";
                    acc.AddParameter("XMLFile", strScripts + @"1.xml");
                    break;

                case 2:
                    strMessage = "[Als Punkt]";
                    acc.AddParameter("XMLFile", strScripts + @"2.xml");
                    break;

                case 3:
                    strMessage = "[Mit Zielfestlegung]";
                    acc.AddParameter("XMLFile", strScripts + @"3.xml");
                    break;

                default:
                    MessageBox.Show("Parameter nicht bekannt",
                        "Fehler", MessageBoxButtons.OK,
                        MessageBoxIcon.Error);
                    return;
            }

            oCLI.Execute("XSettingsImport", acc);

            MessageBox.Show("Einstellungen wurden importiert.\n"
                + strMessage, "Information",
                MessageBoxButtons.OK,
                MessageBoxIcon.Information);

        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message, "Fehler",
                MessageBoxButtons.OK,
                MessageBoxIcon.Error);
        }

        return;
    }
    public void MultilanguageToolExamples_Set_Void()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        oCLI.Execute("XTrSettingsDlgAction"); // Settings DEFAULT

        #region SetProjectLanguages
        acc.AddParameter("LANGUAGELIST", "de_DE;en_EN;zh_CN;");
        oCLI.Execute("SetProjectLanguages", acc);
        oCLI.Execute("XTrSettingsDlgAction");
        #endregion

        #region ChangeLanguage
        acc.AddParameter("varLANGUAGE","en_EN");
        acc.AddParameter("dispLANGUAGE", "en_EN;zh_CN;");
        oCLI.Execute("ChangeLanguage", acc);
        oCLI.Execute("XTrSettingsDlgAction");
        #endregion
    }
    public void ActionFunction()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        string strPages = string.Empty;

        acc.AddParameter("TYPE", "PAGES");

        oCLI.Execute("selectionset", acc);

        acc.GetParameter("PAGES", ref strPages);

        acc.AddParameter("PAGENAME", strPages);

        oCLI.Execute("print", acc);

        //MessageBox.Show("Seite gedruckt");
        return;
    }
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        acc.AddParameter("TYPE", "DXFPAGE");
        acc.AddParameter("IMPORTFILE", @"C:\DXF\Smile.dxf");

        oCLI.Execute("import", acc);

        return;
    }
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        acc.AddParameter("ScriptFile",
            @"C:\EPLAN Scripting Project\01_Erste_Schritte\01_Start.cs");

        oCLI.Execute("ExecuteScript", acc);

        return;
    }
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        acc.AddParameter("Name", "XGedIaFormatText");
        acc.AddParameter("height", "20");

        oCLI.Execute("XGedStartInteractionAction", acc);

        return;
    }
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        acc.AddParameter("TYPE", "PROJECT");

        oCLI.Execute("print", acc);

        MessageBox.Show("Action ausgeführt.");

        return;
    }
    public void Execute()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();
        string ActionReturnParameterValue = string.Empty;

        acc.AddParameter("Language", "Project"); // parameters: "Project" or "Display"
        acc.AddParameter("DialogName", "MyDialogName");
        oCLI.Execute("SelectLanguage", acc);
        acc.GetParameter("Language", ref ActionReturnParameterValue);

        MessageBox.Show("Language from SelectLanguage:\n\n---> " + ActionReturnParameterValue);
    }
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        acc.AddParameter("PAGENAME", "=+/1");
        acc.AddParameter("DEVICENAME", "=+-1K1");
        acc.AddParameter("FORMAT", "XDLTxtImporterExporter");

        oCLI.Execute("edit", acc);

        return;
    }
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        acc.AddParameter("CONFIGSCHEME", "Standard");
        acc.AddParameter("FILTERSCHEME", "Allpolig");

        oCLI.Execute("compress", acc);

        MessageBox.Show("Action ausgeführt.");

        return;
    }
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        acc.AddParameter("Project", @"C:\Projekte\Beispielprojekt.elk");
        acc.AddParameter("Action", "reports");
        acc.AddParameter("NOCLOSE", "1");

        oCLI.Execute("ProjectAction", acc);

        MessageBox.Show("Action ausgeführt.");

        return;
    }
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();

        Progress oProgress = new Progress("EnhancedProgress");
        oProgress.SetAllowCancel(false);
        oProgress.ShowImmediately();

        oProgress.BeginPart(33, "Part 1");
        oCLI.Execute("generate /TYPE:CONNECTIONS");
        oProgress.EndPart();

        oProgress.BeginPart(33, "Part 2");
        oCLI.Execute("reports");
        oProgress.EndPart();

        oProgress.BeginPart(33, "Part 3");
        oCLI.Execute("compress /FILTERSCHEME:Standard");
        oProgress.EndPart();

        oProgress.EndPart(true);

        return;
    }
    public void Function()
    {
        string strProjects =
            PathMap.SubstitutePath("$(MD_PROJECTS)");
        string strFilename = string.Empty;

        OpenFileDialog ofd = new OpenFileDialog();
        ofd.Filter = "ProjectInfo.xml|ProjectInfo.xml";
        ofd.InitialDirectory = strProjects;
        ofd.Title = "Projekteigenschaften auswählen:";
        ofd.ValidateNames = true;

        if (ofd.ShowDialog() == DialogResult.OK)
        {
            strFilename = ofd.FileName;

            Progress oProgress = new Progress("SimpleProgress");
            oProgress.SetAllowCancel(false);
            oProgress.BeginPart(100, "");
            oProgress.SetTitle("Projekteigenschaften importieren");
            oProgress.ShowImmediately();

            CommandLineInterpreter oCLI = new CommandLineInterpreter();
            ActionCallingContext cc = new ActionCallingContext();

            cc.AddParameter("TYPE", "READPROJECTINFO");
            cc.AddParameter("FILENAME", strFilename);
            oCLI.Execute("projectmanagement", cc);

            oProgress.EndPart(true);

            oCLI.Execute("XPrjActionPropertiesEdit");
        }

        return;
    }
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        acc.AddParameter("PropertyId", "10013");
        acc.AddParameter("PropertyIndex", "0");
        acc.AddParameter("PropertyValue", "23542");

        oCLI.Execute("XEsSetProjectPropertyAction", acc);

        MessageBox.Show("Action ausgeführt.");

        return;
    }
    public void Function()
    {
        string strProjectpath =
            PathMap.SubstitutePath("$(PROJECTPATH)") + @"\";

        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        acc.AddParameter("TYPE", "EXPORT");
        acc.AddParameter("EXPORTFILE", strProjectpath + "Partlist.txt");
        acc.AddParameter("FORMAT", "XPalCSVConverter");

        oCLI.Execute("partslist", acc);

        MessageBox.Show("Action ausgeführt.");

        return;
    }
    public void Function()
    {
        string strFullProjectname =
        PathMap.SubstitutePath("$(P)");
        string strProjectpath =
            PathMap.SubstitutePath("$(PROJECTPATH)" + @"\");
        string strProjectname =
            PathMap.SubstitutePath("$(PROJECTNAME)");

        DialogResult Result = MessageBox.Show(
            "Soll ein PDF für das Projekt\n'"
            + strProjectname +
            "'\nerzeugt werden?",
            "PDF-Export",
            MessageBoxButtons.YesNo,
            MessageBoxIcon.Question
            );

        if (Result == DialogResult.Yes)
        {
            Progress oProgress = new Progress("SimpleProgress");
            oProgress.SetAllowCancel(true);
            oProgress.SetAskOnCancel(true);
            oProgress.BeginPart(100, "");
            oProgress.ShowImmediately();

            CommandLineInterpreter oCLI = new CommandLineInterpreter();
            ActionCallingContext acc = new ActionCallingContext();

            acc.AddParameter("TYPE", "PDFPROJECTSCHEME");
            acc.AddParameter("PROJECTNAME", strFullProjectname);
            acc.AddParameter("EXPORTFILE",
                strProjectpath + strProjectname);
            acc.AddParameter("EXPORTSCHEME", "EPLAN_default_value");

            oCLI.Execute("export", acc);

            oProgress.EndPart(true);
        }

        return;
    }
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        acc.AddParameter("TYPE", "PROJECT");
        acc.AddParameter("ARCHIVENAME",
            @"C:\Projekte\Beispielprojekt.zw1");
        acc.AddParameter("PROJECTNAME",
            @"C:\Projekte\Beispielprojekt.elk");
        acc.AddParameter("UNPACKPROJECT", "0");
        acc.AddParameter("MODE", "1");
        acc.AddParameter("NOCLOSE", "1");

        oCLI.Execute("restore", acc);

        MessageBox.Show("Action ausgeführt.");

        return;
    }
    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        acc.AddParameter("TYPE", "CABLES");
        acc.AddParameter("CREATIONSCHEME", "Standard");
        acc.AddParameter("NUMBERINGSCHEME", "Standard");
        acc.AddParameter("AUTOSELECTSCHEME", "Standard");
        acc.AddParameter("REGENERATECONNS", "1");
        acc.AddParameter("KEEPOLDNAMES", "1");
        acc.AddParameter("STARTVALUE", "1");
        acc.AddParameter("STEPVALUE", "1");
        acc.AddParameter("ONLYAUTOCABLES", "1");
        acc.AddParameter("REBUILDALLCONNECTIONS", "1");

        oCLI.Execute("generate", acc);

        MessageBox.Show("Action ausgeführt.");

        return;
    }