General Commands > About General Commands > model.attr(<tag>)

model.attr(<tag>)
Model entity methods for adding and accessing name, tag, version, comments, date created, and the author information for a model entity.
Syntax
model.attr(<tag>) returns a model entity with tag <tag>. The string attr denotes a method name for accessing a model entity with tag <tag>.
model.attr(<tag>).active(bool) makes the entity with tag <tag> active or inactive.
model.attr(<tag>).author() returns the author of the entity.
model.attr(<tag>).author(<author>) sets the author of the entity.
model.attr(<tag>).comments() returns the comments of the entity.
model.attr(<tag>).comments(<comments>) sets the comments of the entity.
model.attr(<tag>).dateCreated() returns the creation date of the entity.
model.attr(<tag>).isActive() returns true if the entity with tag <tag> is active.
model.attr(<tag>).label() returns the label of the entity.
model.attr(<tag>).label(<label>) sets the label of the model entity. The label is an arbitrary nonempty string.
model.attr(<tag>).resetAuthor(<author>) sets the author of the entity and all its children. In particular, when used on the model itself, the method sets the author on all model entities of the model.
model.attr(<tag>).tag() returns the tag of the entity.
model.attr(<tag>).tag(<newtag>) assigns the new tag <newtag> to the entity <tag>.
model.attr(<tag>).version(<version>) sets the version of the entity. The version is a user-defined string.
model.attr(<tag>).version() returns the version of the entity.
model.attr(<tag>).help() and model.attr(<tag>).help(string) return a string pointer to locally installed HTML documentation. string is the name of a type within the model object.
See also
model