Harness proD API Help
EPLAN.Harness.API.DataStructures.Tasks Namespace / TaskConfiguration Class / Types Property
Example
In This Topic
    Types Property (TaskConfiguration)
    In This Topic
    Active types in this configuration.
    Syntax
    public ApiTaskType Types {get; set;}
    Example
    This example show how to modify whole set of types.
    // Create new task configuration (with two task types).
    TaskConfiguration config = new TaskConfiguration("APIConfig", ApiTaskType.UnusedWireHarnesses | ApiTaskType.UnusedCableUnits);
    					
    // Required task types.
    ApiTaskType newTypes = ApiTaskType.WireHarnessCollisions | ApiTaskType.WireHarnessIdCheck;
    					
    // Set new task type to the configuration.
    config.Types = newTypes;
    This example show how to add a type.
    // Create new task configuration (with two task types).
    TaskConfiguration config = new TaskConfiguration("APIConfig", ApiTaskType.UnusedWireHarnesses | ApiTaskType.UnusedCableUnits);
    
    // Add one type to the existing types.
    config.Types |= piTaskType.TerminalStripCheck;
    This example show how to remove a type.
    // Create new task configuration (with two task types).
    TaskConfiguration config = new TaskConfiguration("APIConfig", ApiTaskType.UnusedWireHarnesses | ApiTaskType.UnusedCableUnits);
    
    // Remove one type from the existing types.
    config.Types &= ~piTaskType.UnusedWireHarnesses;
    See Also