Harness proD API Help
EPLAN.Harness.API.Occurrences.Nailboard Namespace / OccNbSpiderDiagram Class / LegText2 Property
Example
In This Topic
    LegText2 Property (OccNbSpiderDiagram)
    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 EPLAN.Harness.API.HpdApi.Status property. If API is uninitialized, you can initialize it by calling EPLAN.Harness.API.HpdApi.Init 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