Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# python
import lx
def get_selection_mode():
""" Get the current selection mode
:rtype: int
"""
# Get the selection service
sel_svc = lx.service.Selection()
# Create a storage object for integer, required as input for the CurrentType method,
types = lx.object.storage('i')
return sel_svc.CurrentType(types)
def main():
selection_mode = get_selection_mode()
msg = "Current selection type is: {}"
lx.out(msg.format(sel_svc.LookupName(selection_mode)))
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment