Model.hm_getcardimageoptions#
- Model.hm_getcardimageoptions(entityType, cardImage, option)#
Returns information about certain options supported by a card image.
- Parameters:
entityType (EntityFullType) – The type of entity to query. Currently supported for properties.
cardImage (hwString) – The name of the card image to query e.g. “P1_SHELL”. Only card images for the current template are supported.
option (hwString) –
The option value to query for the entity type. Valid values for properties are:
material
Returns 1 if the entity allows a direct material assignment, 0 otherwise.
beamsection
Returns 1 if the entity allows a direct beamsect assignment, 0 otherwise.
beamsection_attrib
If beamsection option returns 1 this returns the attribute to use to assign the beamsection, 0 otherwise.
thickness
Returns 1 if the panel allows a direct material assignment, 0 otherwise.
thickness_attrib
If thickness option returns 1 this returns the attribute to use to assign the thickness value, 0 otherwise.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:propertyValue (int)
Examples#
Radioss examples#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_getcardimageoptions( entityType=ent.Property, cardImage="P1_SHELL", option="material" ) print("Option for above cardimage:", result.propertyValue) # Value is: 0 _, result = model.hm_getcardimageoptions( entityType=ent.Property, cardImage="P1_SHELL", option="beamsection" ) print("Option for above cardimage:", result.propertyValue) # Value is: 0 _, result = model.hm_getcardimageoptions( entityType=ent.Property, cardImage="P1_SHELL", option="beamsection_attrib" ) print("Option for above cardimage:", result.propertyValue) # Value is: 0 _, result = model.hm_getcardimageoptions( entityType=ent.Property, cardImage="P1_SHELL", option="thickness" ) print("Option for above cardimage:", result.propertyValue) # Value is: 1 _, result = model.hm_getcardimageoptions( entityType=ent.Property, cardImage="P1_SHELL", option="thickness_attrib" ) print("Option for above cardimage:", result.propertyValue) # Value is: 431
OptiStruct examples#import hm import hm.entities as ent model = hm.Model() _, result = model.hm_getcardimageoptions( entityType=ent.Property, cardImage="PBEAM", option="material" ) print("Option for above cardimage:", result.propertyValue) # Value is: 1 _, result = model.hm_getcardimageoptions( entityType=ent.Property, cardImage="PBEAM", option="beamsection" ) print("Option for above cardimage:", result.propertyValue) # Value is: 1 _, result = model.hm_getcardimageoptions( entityType=ent.Property, cardImage="PBEAM", option="beamsection_attrib" ) print("Option for above cardimage:", result.propertyValue) # Value is: 3186 _, result = model.hm_getcardimageoptions( entityType=ent.Property, cardImage="PBEAM", option="thickness" ) print("Option for above cardimage:", result.propertyValue) # Value is: 0 _, result = model.hm_getcardimageoptions( entityType=ent.Property, cardImage="PBEAM", option="thickness_attrib" ) print("Option for above cardimage:", result.propertyValue) # Value is: 0