Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

How to create a command line menu with numbers?

$
0
0

Hi,

I need a command prompt menu with numbers for the user to click on, but for the values to display they have to start with a string character, so I had to add a letter, v in front.

image

def open_grid_spacing_submenu(current_value):

    spacing_items = [
        ("v1000", 1000.0),
        ("v500", 500.0),
        ("v200", 200.0),
        ("v100", 100.0),
        ("v50", 50.0),
        ("v10", 10.0),
        ("v1", 1.0),
        ("v05", 0.5),
        ("v02", 0.2),
        ("v01", 0.1),
    ]

How do I do this properly ?
Thank you!

4 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles