Skip to content

Instantly share code, notes, and snippets.

@rondreas
Created March 22, 2021 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rondreas/ad2992c5c60aa640eec0692c13d3714a to your computer and use it in GitHub Desktop.
Save rondreas/ad2992c5c60aa640eec0692c13d3714a to your computer and use it in GitHub Desktop.
# 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