This method executes a mini routine based on the mini routine's name.
Visual Basic |
---|
Public Sub ExecuteMiniRoutineByName( _ ByVal Name As String, _ ByVal AlignmentDependencies As Boolean _ ) |
- Name
- This string defines the name of the mini routine to execute.
- AlignmentDependencies
- This determines if the mini routine also executes features required to create the alignment.
This example, shows how to use the ExecuteMiniRoutineByName method to execute some mini routines from some names:
Example (C#) | Copy Code |
---|---|
using System; using System.Diagnostics; using System.Collections.Generic; using System.Dynamic; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; 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.OnStartExecution += part_OnStartExecution; part.OnEndExecution += part_OnEndExecution; part.ExecuteMiniRoutineByName("OP10", true); waitForExecutionToComplete(); part.ExecuteMiniRoutineByName("MiniRoutine2", true); waitForExecutionToComplete(); part.ExecuteMiniRoutineByName("MiniRoutine3", true); waitForExecutionToComplete(); part.ExecuteMiniRoutineByName("MiniRoutine4", true); waitForExecutionToComplete(); } static void waitForExecutionToComplete() { while (IsExecuting) { // Do nothing } } static void part_OnStartExecution() { IsExecuting = true; } static void part_OnEndExecution(int terminationType) { IsExecuting = false; } } } |