Created
March 22, 2021 09:41
-
-
Save rondreas/ad2992c5c60aa640eec0692c13d3714a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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