Harness proD API Help
EPLAN.Harness.API.Occurrences.CableDrawing Namespace / OccCdSpiderDiagram Class / LegText2 Property
Example
In This Topic
    LegText2 Property (OccCdSpiderDiagram)
    In This Topic
    Second text for a leg of this spider diagram. (The text after the colon.)
    Syntax
    public TextProperty LegText2 {get; set;}
    Exceptions
    ExceptionDescription
    Api is not in an initialized state. You can get current state from Status property. If API is uninitialized, you can initialize it by calling Init(String,String[]) method. If API is in failed state, you can not resurrect it.
    The object is in invalid state. Obtain a new one.
    The exception that is thrown when you trying to access to already deleted occurrence.
    Argument is invalid. The exception is thrown when a wrong argument is passed to the method or the setter of property.
    Remarks
    The text for any leg of the spider diagram consist of: 'LegText1' : 'LegText2'.
    Example
    This example shows how to set LegText2 to any value.
    OccCdSpiderDiagram spiderDiagram = ...
    
    // Get all the possible properties.
    List<string> names = spiderDiagram.GetPossibleLegTexts();
    
    // Select your favorite property.
    string name = names.FirstOrDefault(n => n == "Document");
    
    spiderDiagram.LegText2 = new TextProperty(name);
    This example shows how to set LegText2 to any value.
    OccCdSpiderDiagram spiderDiagram = ...
    
    spiderDiagram.LegText2 = spiderDiagram.GetPossibleLegTexts().FirstOrDefault(n => n == "Project");
    This example shows how to set LegText2 to not show any value.
    OccCdSpiderDiagram spiderDiagram = ...
    
    spiderDiagram.LegText2 = new TextProperty(null);
    
    // Or just:
    // spiderDiagram.LegText2 = null;
    See Also