Harness proD API Help
EPLAN.Harness.API.Projects.Documents Namespace / Project Class / CreateVariant Method
Variant name
Create variant in background without showing it in UI. Use when creating bigger bunch of variants at once to avoid refreshing UI constantly. You are responsible for calling the UpdateProjectStructure method at the end, otherwise the state of the project structure is undefined.
In This Topic
    CreateVariant Method
    In This Topic
    Create a new variant in this project.
    Syntax
    public Variant CreateVariant( 
       string name,
       bool silent
    )

    Parameters

    name
    Variant name
    silent
    Create variant in background without showing it in UI. Use when creating bigger bunch of variants at once to avoid refreshing UI constantly. You are responsible for calling the UpdateProjectStructure method at the end, otherwise the state of the project structure is undefined.

    Return Value

    New variant.
    Exceptions
    ExceptionDescription
    The object is in invalid state. Obtain a new one.

    Internal error of HpD or HpD API.

    IMPORTANT: Throwing this exception changes HpD Api's state to Failed.

    Argument is invalid. The exception is thrown when a wrong argument is passed to the method or the setter of property.
    The operation was not successful.
    This name is already taken. Pick a different one.
    See Also