part_selection_by#

command.part_selection_by(p0: str) int#

Determines if command language will record part selections by name or by number as it appears in the part list.

This setting is typically controlled in the Preference dialog. Creating command files that reference names instead of numbers may be more portable if the names used in the data files are relatively generic.
Args:
p0:

‘method’

  • number

  • name

Examples:
#
# Turn visibility of part
# number 2 off
#
ensight.command.part_selection_by("number")
ensight.part.select_begin(2)
ensight.part.modify_begin()
ensight.part.visible("OFF")
ensight.part.modify_end()
ensight.command.part_selection_by("name")
#
# Turn visibility of part named "external flow field"
# off
#
# WARNING: following line includes OBSOLETE call (ensight.part.select_partname_begin).
ensight.part.select_partname_begin("external flow field")
ensight.part.modify_begin()
ensight.part.visible("ON")
ensight.part.modify_end()
Returns:

zero on success, non-zero on error