Harness proD API Help
EPLAN.Harness.API.Occurrences.Interfaces Namespace / IOccDrawingHeader Interface / FillDrawingHeader Method
Items to fill into this drawing header.
Example
In This Topic
    FillDrawingHeader Method (IOccDrawingHeader)
    In This Topic
    Fill new data into this drawing header.
    Syntax

    Parameters

    drawingHeaderItems
    Items to fill into this drawing header.
    Exceptions
    ExceptionDescription
    Api is not in an initialized state. You can get current state from EPLAN.Harness.API.Studio.Status property. If API is uninitialized, you can initialize it by calling EPLAN.Harness.API.Studio.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.
    The exception that is thrown when you trying to insert wrong list of drawing header items into a drawing header occurrence.
    The operation was not successful.
    Example
    // Use your favourite method to get a drawing header occurrence.
    IOccDrawingHeader drawingHeader = GetDrawingHeader();
    					
    // Get current drawing header items.
    IReadOnlyList<DrawingHeaderItem> items = drawingHeader.DrawingHeaderItems;
    
    // Feel free to edit its values.
    items[0].Value = "My first value";
    items[1].Value = "My second value";
    
    // Uh...I don't want to use the first value anymore...
    items[0].UseDefaultValue();
    
    // Fill drawing header with the edited list of drawing header items.
    drawingHeader.FillDrawingHeader(items);
    
    // Do not forgot to save the changes ;)
    See Also