Main Content

setName

Set name for value type, function argument, interface, or element

    Description

    setName(interfaceElem,name) sets the name for the designated value type, interface, element, or function argument.

    example

    Examples

    collapse all

    Create a model archModel.

    modelName = "archModel";
    arch = systemcomposer.createModel(modelName);
    systemcomposer.openModel(modelName);

    Add a data interface, then create an data element x.

    interface = arch.InterfaceDictionary.addInterface("interface");
    elem = interface.addElement("x");

    Set a new name for the data element as newName.

    setName(elem,"newName");

    Input Arguments

    collapse all

    Name of value type, function argument, interface, or element, specified as a character vector or string. This name must be a valid MATLAB® identifier.

    Example: "newName"

    Data Types: char | string

    More About

    collapse all

    Version History

    Introduced in R2019a

    See Also

    Functions

    Objects

    Blocks

    Tools