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

GetBoolean if else

$
0
0

Hello,

Here’s a simple script asking the user to choose between square or rectangle and print the result accordingly. Question: why is the answer always square?

import rhinoscriptsyntax as rs

items = [("ChooseType", "Square", "Rectangular")]
footPrintType = rs.GetBoolean("Footprint types", items, (True))
if footPrintType == False: 
    print("You've selected a rectangle")
else: 
    print("You've selected a square")

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles