hwILayer SetAttribute

Sets the value of a given attribute for a layer.

Syntax

hwILayer_handle SetAttribute attribute_name, attribute_value

Application

HyperWorks Tcl Modify

Description

When a layer's attribute is modified, all objects associated with that layer change. Currently, only curves, notes, and datum lines from the HyperGraph application are associated with layers.

Inputs

attribute_name
The name of the attribute to be modified. Valid attributes include:
  • linestyle
  • linecolor
  • linethickness
  • symbolstyle
  • symbolcolor
attribute_value
The new value of the attribute. Valid values depend on the attribute being set.

Example

To change the color of a newly-added layer to red:

hwi GetSessionHandle mySession
mySession GetProjectHandle myProject
set layerID [myProject AddLayer]
myProject GetLayerHandle myLayer $layerID
myLayer SetAttribute linecolor 7
myLayer SetAttribute symbolstyle 3 

Errors

Success (0) or an error code.

3 = HW_InvalidHandle
The handle used to invoke the method is no longer valid.