Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

Create Attribute

Use this command to create an Attribute definition.

An attribute is data used to describe the characteristics of an object in Longview. For example, SWFAdminEMail is an Attribute representing the email address of an administrator.

This command must be used in conjunction with Maintenance. While it is enabled, no other users can perform maintenance related activities in the Data Server repository. When you are finished, you must remember to disable the Maintenance mode, and thereby allow normal access by other users. For more information, see Maintenance or Exclusive.

Syntax (regular)

CREATE ATTRIBUTE AttrClass AttrName AttrDesc AttrType AccessType DefaultValue

where:

  • AttrClass is the Attribute class. Select one of the following:
    Value Description

    SYSTEM

    Describes the entire Longview system at the highest level. Attributes of this Attribute class specify system-wide characteristics. There is only one object in the SYSTEM Attribute class—the application itself.

    USER

    Describes the Attributes of a particular user. Each user is an object in the USER Attribute class.    

    SYMBOL

    Describes the characteristics of individual symbols. Each symbol is an object in the SYMBOL Attribute class.

  • AttrName is the Attribute name.
  • AttrDesc is the Attribute description. Descriptions for new attributes are automatically saved as English. If you want the attribute to have an alternate language description, you must use the Set Attribute command. For more information, see Set Attribute.
  • AttrType is the Attribute type. Select one of the following:
    Value Description

    DATE

    Date and time.

    DATELIST

    List of one or more Date values.

    DOUBLE

    Numeric value.

    DOUBLELIST

    List of one or more numeric values.

    INTEGER

    Integer value.

    INTEGERLIST

    List of one or more INTEGER values.

    STRING

    Alphanumeric character string.

    STRINGLIST

    List of one or more STRING values.

    SYMBOL

    A valid symbol.

    SYMBOLLIST

    List of one or more SYMBOL values.

  • AccessType is a setting. Select one of the following:
    Value Description

    READ

    Read-only access, to allow the user to view the attribute value but not change it. This is the default. Symbol and System Attributes are always Read type.

    WRITE

    Write access, to allow the user to set the attribute value. Write can only be used for User Attributes.

  • DefaultValue is the default value for the Attribute.

Syntax example

MAINTENANCE ON

CREATE ATTRIBUTE SYSTEM SYSTEST "System Test" LONG Read "100"

MAINTENANCE OFF

Creating an ASCII input file

To create a large number of Attribute definitions, specify the parameters for this command in an ASCII file.

Create an ASCII file containing the following information:

Syntax

AttrClass{AttrName{AttrDesc{AttrType{AccessType{AttrDefault

Syntax (with an ASCII file)

CREATE ATTRIBUTE @FileName

where:

  • FileName is an ASCII file containing the data. It can include a complete or partial folder path in the format C:\...\FileName. If FileName includes spaces, enclose it in double quotation marks; for example:

    @"C:\My Documents\My Data.txt"

Note: If the document is in the same location as lv_af.exe, you do not need to specify the drive or path.

Syntax example

CREATE ATTRIBUTE @sysattr.asc

See also

Published:

Create Attribute

Use this command to create an Attribute definition.

An attribute is data used to describe the characteristics of an object in Longview. For example, SWFAdminEMail is an Attribute representing the email address of an administrator.

This command must be used in conjunction with Maintenance. While it is enabled, no other users can perform maintenance related activities in the Data Server repository. When you are finished, you must remember to disable the Maintenance mode, and thereby allow normal access by other users. For more information, see Maintenance or Exclusive.

Syntax (regular)

CREATE ATTRIBUTE AttrClass AttrName AttrDesc AttrType AccessType DefaultValue

where:

  • AttrClass is the Attribute class. Select one of the following:
    Value Description

    SYSTEM

    Describes the entire Longview system at the highest level. Attributes of this Attribute class specify system-wide characteristics. There is only one object in the SYSTEM Attribute class—the application itself.

    USER

    Describes the Attributes of a particular user. Each user is an object in the USER Attribute class.    

    SYMBOL

    Describes the characteristics of individual symbols. Each symbol is an object in the SYMBOL Attribute class.

  • AttrName is the Attribute name.
  • AttrDesc is the Attribute description. Descriptions for new attributes are automatically saved as English. If you want the attribute to have an alternate language description, you must use the Set Attribute command. For more information, see Set Attribute.
  • AttrType is the Attribute type. Select one of the following:
    Value Description

    DATE

    Date and time.

    DATELIST

    List of one or more Date values.

    DOUBLE

    Numeric value.

    DOUBLELIST

    List of one or more numeric values.

    INTEGER

    Integer value.

    INTEGERLIST

    List of one or more INTEGER values.

    STRING

    Alphanumeric character string.

    STRINGLIST

    List of one or more STRING values.

    SYMBOL

    A valid symbol.

    SYMBOLLIST

    List of one or more SYMBOL values.

  • AccessType is a setting. Select one of the following:
    Value Description

    READ

    Read-only access, to allow the user to view the attribute value but not change it. This is the default. Symbol and System Attributes are always Read type.

    WRITE

    Write access, to allow the user to set the attribute value. Write can only be used for User Attributes.

  • DefaultValue is the default value for the Attribute.

Syntax example

MAINTENANCE ON

CREATE ATTRIBUTE SYSTEM SYSTEST "System Test" LONG Read "100"

MAINTENANCE OFF

Creating an ASCII input file

To create a large number of Attribute definitions, specify the parameters for this command in an ASCII file.

Create an ASCII file containing the following information:

Syntax

AttrClass{AttrName{AttrDesc{AttrType{AccessType{AttrDefault

Syntax (with an ASCII file)

CREATE ATTRIBUTE @FileName

where:

  • FileName is an ASCII file containing the data. It can include a complete or partial folder path in the format C:\...\FileName. If FileName includes spaces, enclose it in double quotation marks; for example:

    @"C:\My Documents\My Data.txt"

Note: If the document is in the same location as lv_af.exe, you do not need to specify the drive or path.

Syntax example

CREATE ATTRIBUTE @sysattr.asc

See also

For an optimal Community experience, Please view on Desktop