reset_tool_constrain#

view_transf.reset_tool_constrain(p0: str) int#

Sets scope for the resetting of tool locations. The reset can cause the tool to be placed at its initial default location or at the center of the parts in the current viewport.

The state set here applies to all future tool resets.
Args:
p0:

‘option’

  • by_global

  • by_viewport

Examples:
# 
# Set the tool reset state to be "by viewport" 
# 
ensight.view_transf.reset_tool_constrain("by_viewport")
# 
# Select the viewport(s) desired 
# 
ensight.viewport.select_begin(0)
# 
# Reset the plane tool to the center of parts 
# parts in viewport 0 
# 
ensight.view_transf.function("plane")
ensight.view_transf.reset_rot_trn_scl()
Returns:

zero on success, non-zero on error