Model.hm_attributetype#
- Model.hm_attributetype(attribute_id)#
Returns the attribute type number of an attribute for the current template. If the attribute is not an attribute from the current template, an error is returned.
- Parameters:
attribute_id (int) – The ID of the attribute to query. The attribute must be in the current template.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:type (int) - The type can be one of the following values:
1 - integer
2 - double
3 - string
4 - 1D integer array
5 - 1D double array
6 - entity
7 - (not supported)
8 - (not supported)
9 - 2D integer array
10 - 2D double array
11 - string array
12 - 1D entity array
13 - 2D entity array
Example#
Get the attribute type number of the attribute with ID 149 for the LS - DYNA template#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_attributetype(attribute_id=149) print("Attribute Type:", result.type)