public void FillDrawingHeader( IReadOnlyList<DrawingHeaderItem> drawingHeaderItems )
Parameters
- drawingHeaderItems
- Items to fill into this drawing header.
public void FillDrawingHeader( IReadOnlyList<DrawingHeaderItem> drawingHeaderItems )
Exception | Description |
---|---|
EPLAN.Harness.API.Exceptions.HpdApiNotInitializedException | 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. |
EPLAN.Harness.API.Exceptions.ObjectInvalidException | The object is in invalid state. Obtain a new one. |
EPLAN.Harness.API.Exceptions.OccurrenceDeletedException | The exception that is thrown when you trying to access to already deleted occurrence. |
EPLAN.Harness.API.Exceptions.WrongDrawingHeaderDataException | The exception that is thrown when you trying to insert wrong list of drawing header items into a drawing header occurrence. |
EPLAN.Harness.API.Exceptions.OperationFailedException | The operation was not successful. |
// 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 ;)