Model.admascreatemultentselectwithsets#
- Model.admascreatemultentselectwithsets(collection, additional_node_collection, vis_node_entity, type, magnitude, attach_sets_flag)#
Creates mass elements with the option to create the mass on the independent entities or to create a set out of those entities and attach the set to the element mass created.
- Parameters:
collection (Collection) – The collection of entities containing the nodes which the mass element will be created with. Valid entity types are components, materials, blocks, properties, sets and nodes.
additional_node_collection (Collection) – The collection containing any additional nodes.
vis_node_entity (Entity) – The object describing the entity.
type (int) – The mass solver type. This depends on the current template.
magnitude (double) – The magnitude of the mass.
attach_sets_flag (int) –
Indicates whether to create the mass on the independent selected entities or to create a set out of those entities and create the mass on the set.
0 - Do not create set.
1 - Create set.
Example#
Create a mass element using components with IDs 1 - 3 as a set , visualization node with ID 50 , solver type 3 and magnitude of 5.5#import hm import hm.entities as ent model = hm.Model() comps = hm.Collection(model,ent.Component,[1,2,3]) model.admascreatemultentselectwithsets( collection=comps, additional_node_collection=hm.Collection(model,ent.Node,populate=False), vis_node_entity=ent.Node(model,50), type=3, magnitude=5.5, attach_sets_flag=1 )