API Help
Eplan.EplApi.HEServices Namespace / DeviceService Class / AssignMainFunction Method
Function will be assigned the "Main function" property. Can't be null or transient.
If true then properties of old main function that contain value are transfered to properties on new main function that contain no value.
If true then properties of old main function that contain no value removes existing properties on new main function.

In This Topic
    AssignMainFunction Method
    In This Topic
    Converts auxiliary function into main function.
    Syntax

    Parameters

    pFunction
    Function will be assigned the "Main function" property. Can't be null or transient.
    bOverwriteEmptyPropsWithFilledProps
    If true then properties of old main function that contain value are transfered to properties on new main function that contain no value.
    bOverwriteFilledPropsWithEmptyProps
    If true then properties of old main function that contain no value removes existing properties on new main function.
    Exceptions
    ExceptionDescription
    Thrown when pFunction is null.
    Thrown when pFunction is invalid.
    Remarks

    Changes an auxiliary function into a main function by assigning the "Main function" property to the auxiliary function. The auxiliary function is changed into a main function. The original main function is then converted to an auxiliary function. Converting function to main function adopts properties from old to new main function based on parameters passed to method.

    This method makes no changes to functions which are transient or their category is Terminal or ArticlePlacement. For such functions it returns false.

    See Also