This method executes multiple mini routines contained within an array of strings. Each item in the array is a mini routine name.
Visual Basic |
---|
Public Function ExecuteMiniRoutineByNameArray( _ ByVal NameArray As StringArray, _ ByVal AlignmentDependencies As Boolean _ ) As Boolean |
- NameArray
- This array contains a list of mini routine names to execute.
- AlignmentDependencies
- This determines if the mini routine also executes features required to create the alignment.
Returns True if the method succeeds and False otherwise.
This shows how to create string arrays of mini routine names and of UIDs (unique IDs) and how to execute them:
Example (C#) | Copy Code |
---|---|
using PCDLRN; namespace ConsoleApplication1 { class Program { static bool IsExecuting { get; set; } static void Main(string[] args) { var app = new Application {Visible = true}; var part = app.ActivePartProgram; if (part == null) return; part.PartProgramSettings.MiniroutineSettings.FbmMarkingMode = true; part.PartProgramSettings.MiniroutineSettings.ManualAlignFeaturesStatus = true; part.OnStartExecution += part_OnStartExecution; part.OnEndExecution += part_OnEndExecution; var stringArray = part.GetStringArray(); stringArray.SetSize(4); stringArray.SetValue(1, "OP10"); stringArray.SetValue(2, "MiniRoutine2"); stringArray.SetValue(3, "MiniRoutine3"); stringArray.SetValue(4, "MiniRoutine4"); if (part.ExecuteMiniRoutineByNameArray(stringArray, true, true)) { waitForExecutionToComplete(); } var stringArray2 = part.GetStringArray(); stringArray2.SetSize(4); stringArray2.SetValue(1, "585468144"); stringArray2.SetValue(2, "585478448"); stringArray2.SetValue(3, "589656056"); stringArray2.SetValue(4, "665062208"); if (part.ExecuteMiniRoutineByUIDArray(stringArray2, true, true)) { waitForExecutionToComplete(); } } static void waitForExecutionToComplete() { while (IsExecuting) { // Do nothing } } |