//using System; //using System.IO; public class Beschriftung { [DeclareAction("MYlabel")] public void Beschriftung_aktuelles_Projekt() { Eplan.EplApi.ApplicationFramework.ActionCallingContext RMcallcon = new Eplan.EplApi.ApplicationFramework.ActionCallingContext(); String RMPfad = @"P:\Eplan\Beschriftungen\"; String test = ""; Eplan.EplApi.Base.PathMap RMpath = new Eplan.EplApi.Base.PathMap(); test = RMpath.Substitute("$(PROJECTNAME)"); if (!System.IO.Directory.Exists(RMPfad + test)) { System.IO.Directory.CreateDirectory(RMPfad + test); } RMcallcon.AddParameter("CONFIGSCHEME", "Vorlage_Typ1_Kabelbeschriftung"); RMcallcon.AddParameter("LANGUAGE", "de_DE"); RMcallcon.AddParameter("DESTINATIONFILE", RMPfad + test + @"\Typ1_Kabeltuellen.txt"); RMcallcon.AddParameter("SHOWOUTPUT", "0"); new CommandLineInterpreter().Execute("label", RMcallcon); RMcallcon.AddParameter("CONFIGSCHEME", "Vorlage_Typ141_Klemmebeschriftung"); RMcallcon.AddParameter("LANGUAGE", "de_DE"); RMcallcon.AddParameter("DESTINATIONFILE", RMPfad + test + @"\Typ141_Klemmenbeschriftung.txt"); RMcallcon.AddParameter("SHOWOUTPUT", "0"); new CommandLineInterpreter().Execute("label", RMcallcon); RMcallcon.AddParameter("CONFIGSCHEME", "Vorlage_Typ999_Einzeladerbeschriftung"); RMcallcon.AddParameter("LANGUAGE", "de_DE"); RMcallcon.AddParameter("DESTINATIONFILE", RMPfad + test + @"\Typ999_Einzeladerkennzeichnung.txt"); RMcallcon.AddParameter("SHOWOUTPUT", "0"); new CommandLineInterpreter().Execute("label", RMcallcon); RMcallcon.AddParameter("CONFIGSCHEME", "Vorlage_TypH02_Gravurschild_Maschine"); RMcallcon.AddParameter("LANGUAGE", "de_DE"); RMcallcon.AddParameter("DESTINATIONFILE", RMPfad + test + @"\TypH02_GravurschildMaschine.txt"); RMcallcon.AddParameter("SHOWOUTPUT", "0"); new CommandLineInterpreter().Execute("label", RMcallcon); RMcallcon.AddParameter("CONFIGSCHEME", "Vorlage_Typ67_Bauteilbeschriftung"); RMcallcon.AddParameter("LANGUAGE", "de_DE"); RMcallcon.AddParameter("DESTINATIONFILE", RMPfad + test + @"\Typ67_Bauteilbeschriftung.txt"); RMcallcon.AddParameter("SHOWOUTPUT", "0"); new CommandLineInterpreter().Execute("label", RMcallcon); RMcallcon.AddParameter("CONFIGSCHEME", "Vorlage_TypHOE1_Bauteilbeschriftung_Etikett"); RMcallcon.AddParameter("LANGUAGE", "de_DE"); RMcallcon.AddParameter("DESTINATIONFILE", RMPfad + test + @"\TypHOE1_Bauteilbeschriftung_Etikett.txt"); RMcallcon.AddParameter("SHOWOUTPUT", "0"); new CommandLineInterpreter().Execute("label", RMcallcon); MessageBox.Show("Beschriftung ausgeben fertig!", "Beschriftung"); } [DeclareMenu] public void MenuFunction() { Eplan.EplApi.Gui.Menu oMenu = new Eplan.EplApi.Gui.Menu(); oMenu.AddMenuItem("TEST", "MYlabel"); } }