Attributes

The <Properties> node has the following attributes:

DataEntity

Object

[Data Object Name] - The internal (immutable) name assigned to the Data Object. If this attribute is not specified, a default name is assigned internally. However, specification of a name enables the retrieval of the properties associated with the given object (see below).

Properties

Mandatory attributes for the definition of a property are:

Optional attributes are:

You can access the value for each property from any Python script used with Workbench via the Workbench query GetEntityProperty, as described below:

dataReference = “/” + container + “/” + DataEntityName + “:” + ObjectName 
propertyVal = GetEntityProperty(Entity=dataReference, Name=PropertyName) 

where

It is also possible to change the value of the properties that are not marked as read-only using the Workbench SetEntityProperty command:

SetEntityProperty(Entity=dataReference,Name=PropertyName, Value=value)

where value is the appropriate type for the property being modified. For example, a property of type quantity named “InletVelocity” defined for an object named AnsSettingsObject of the data entity type SettingsDataEntity can be queried and set as follows:

dataReference = “/” + container + “/” + “SettingsDataEntity” + “:” + “AnsSettingsObject” 
value = GetEntityProperty(Entity=dataReference, 
Name = “InletVelocity”) 
SetEntityProperty(Entity = dataReference, 
Name = “InletVelocity”, Value=”10 [m s^-1]”)

Release 18.2 - © ANSYS, Inc. All rights reserved.