[Transaction(TransactionMode.Manual)]
public abstract class BaseExecutePythonCommand : IExternalCommand
{
public Result Execute(
ExternalCommandData commandData,
ref string message,
ElementSet elements)
{
// запускаеne скрипт
// criptEngine engine = Python.CreateEngine();
// ScriptScope scope = engine.CreateScope();
// Брем имя скрипта
// engine.CreateScriptSourceFromFile(ScriptName).Execute(scope);
return Result.Succeeded;
}
public abstract string ScriptName { get; }
}
public class Script1Command : BaseExecutePythonCommand
{
public override string ScriptName
{
get { return "script1.py"; }
}
}
public class Script2Command : BaseExecutePythonCommand
{
public override string ScriptName
{
get { return "script2.py"; }
}
}