Da meine lieben Mitarbeiter immer wider vergessen das Eplan zu schließen möchte in das automatisierte Bearbeiten ( Beschriftung ausgeben ) einen Befehl einbauen, der das Eplan nach Ausgabe der Beschriftung , schließt.
Wenn das geht wo gehört der da rein und wie ?
public class Script
{
[Start]
public bool AutoTreat(String strProjectName, String strSettingsFolder, Int32 nImportSettings, Int32 nCompleteProject, String strSelectionFilter)
{
Progress progress = new Progress("SimpleProgress");
progress.SetAllowCancel(true);
bool bResult = true;
int nActionsPercent = 100;
if (nCompleteProject == 0 && nImportSettings == 1)
{
progress.BeginPart(10, "ReadSelectionSettings");
nActionsPercent -= 10;
Eplan.EplApi.Base.Settings xmlSettings = new Eplan.EplApi.Base.Settings();
xmlSettings.ReadSettings(strSettingsFolder + @"\Selection.xml");
progress.EndPart();
}
progress.BeginPart(nActionsPercent,"");
nActionsPercent = 100;
if(!progress.Canceled())
{
if (nImportSettings == 1)
{
progress.BeginPart(25, "ReadSettings");
nActionsPercent -= 25;
Eplan.EplApi.Base.Settings xmlSettings = new Eplan.EplApi.Base.Settings();
xmlSettings.ReadSettings(strSettingsFolder + @"\Settings1.xml");
progress.EndPart();
}
}
if(!progress.Canceled())
{
progress.BeginPart(nActionsPercent, "label");
ActionCallingContext context1 = new ActionCallingContext ();
context1.AddParameter("configscheme","BMK Ausgabe");
context1.AddParameter("filterscheme","");
context1.AddParameter("sortscheme","");
context1.AddParameter("language","de_DE");
context1.AddParameter("destinationfile",@"$(PROJECTPATH)\Bauteil.txt");
context1.AddParameter("recrepeat","1");
context1.AddParameter("taskrepeat","1");
context1.AddParameter("showoutput","0");
context1.AddParameter("ProjectName",strProjectName);
if (nCompleteProject == 1)
{
context1.AddParameter("type","PROJECT");
}
else
{
context1.AddParameter("type","PAGES");
context1.AddParameter("PAGEFILTERNAME", strSelectionFilter);
}
bResult &= new CommandLineInterpreter().Execute("label",context1);
progress.EndPart();
}
progress.EndPart(true);
return bResult;
}
}
------------------
---------------
mfg Markus
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP