Model.feoutput_select#
- Model.feoutput_select(templateName, outputFileName, select_collectionset, lines, autoprops)#
Exports an ASCII analysis file of selected entities, formatted based on the specified export_template. Only the selected entities are exported.
The following entities will be fully exported, if selected for export: Contactsurf, Loadstep, Outputblock, and Set.
For example, if a set type is element, it will be exported whether or not its referenced elements are also selected. Note that individual entities must be marked. This function does not export any dependent or container entities. For example, elements will not be exported if either a component or a group is exported.
- Parameters:
templateName (hwString) – The full path and filename of the export template to be used. Paths with spaces must be enclosed in quotes.
outputFileName (hwString) – The full path and filename of the output file. Paths with spaces must be enclosed in quotes.
select_collectionset (CollectionSet) – The set of collections containing possibly multiple type of entities to output. This is valid for all supported entity types.
lines (int) – Reserved for future development. Must be set to 0.
autoprops (int) – Reserved for future development. Must be set to 0.
Examples#
Export only elements with IDs 1-5#import hm import hm.entities as ent model = hm.Model() elems = hm.Collection(model, ent.Element, list(range(1, 6))) colset = hm.CollectionSet(model) model.feoutput_select( templateName="tmplFileName", outputFileName="outputFileName", select_collectionset=colset.set(elems), lines=0, autoprops=0 )
Export the nodes of component with ID 1#import hm import hm.entities as ent model = hm.Model() comps = hm.Collection(model, ent.Component, [1]) filter1 = hm.FilterByCollection(ent.Node, ent.Component) nodes = hm.CollectionSet(model, filter1, comps) colset = hm.CollectionSet(model) model.feoutput_select( templateName="tmplFileName", outputFileName="outputFileName", select_collectionset=colset.set(nodes), lines=0, autoprops=0 )
Export the elements in components with IDs 1-3#import hm import hm.entities as ent model = hm.Model() comps = hm.Collection(model, ent.Component, [1, 2, 3]) filter1 = hm.FilterByCollection(ent.Element, ent.Component) elems = hm.Collection(model, filter1, comps) colset = hm.CollectionSet(model) model.feoutput_select( templateName="tmplFileName", outputFileName="outputFileName", select_collectionset=colset.set(elems), lines=0, autoprops=0 )