/// <summary> /// Method called that defines the property schema for the step. /// </summary> public void DefineSchema(IPropertyDefinitions schema) { try { // Example of how to add a property definition to the step. IPropertyDefinition pd; pd = schema.AddStringProperty("ExecutableLocation", ""); pd.DisplayName = "Executable Location"; pd.Description = "The full path to the executable program (.exe)"; pd.Required = true; // A repeat group of columns and expression where the data will be written IRepeatGroupPropertyDefinition arguments = schema.AddRepeatGroupProperty("Arguments"); arguments.Description = "The arguments for the executable. See Argument Logic for options"; pd = arguments.PropertyDefinitions.AddExpressionProperty("ArgumentName", String.Empty); pd.Description = "The name of the argument"; pd = arguments.PropertyDefinitions.AddExpressionProperty("Expression", String.Empty); pd.Description = "The Simio expression that will assigned to the argument."; pd = schema.AddBooleanProperty("WaitForExecutableToExit"); pd.DisplayName = "Wait For Exit"; pd.Description = "If true, then Step will wait in the Step until the executable completes its run"; pd.Required = true; pd.SetDefaultString(schema, "False"); IBooleanPropertyDefinition bpd = schema.AddBooleanProperty("CreateWindow"); bpd.DisplayName = "Create Window"; bpd.Description = "If True, the executable will appear in a new window. Useful for debugging"; bpd.Required = true; bpd.SetDefaultString(schema, "True"); IEnumPropertyDefinition epd = schema.AddEnumProperty("ArgumentLogic", typeof(EnumArgLogic)); epd.Description = "Logic that describes how the Simio Arguments are created"; epd.SetDefaultString(schema, "None"); epd.Required = true; // Example of how to add a property definition to the step. pd = schema.AddStringProperty("Delimiter", ""); pd.DisplayName = "Delimiter"; pd.Description = "The delimiter to use around each argument when calling the executable"; pd.Required = true; bpd = schema.AddBooleanProperty("UseShellExecute"); bpd.DisplayName = "Use Shell Execute"; bpd.Description = "If True, the executable will be run within a Windows Shell."; bpd.Required = true; bpd.SetDefaultString(schema, "True"); } catch (Exception ex) { throw new ApplicationException($"Error creating RunExecutables Schema. Err={ex.Message}"); } }