input string to setup sheet

input string to setup sheet

TechrimStandards
Enthusiast Enthusiast
429 Views
0 Replies
Message 1 of 1

input string to setup sheet

TechrimStandards
Enthusiast
Enthusiast

Hello!

 

So I've made a popup that asks for what pucks we want to remove on our fixture for setup. How do I create the input string as a property to then put into the excel setup sheet?

 

#Author-
#pop up for pucks

import adsk.core, adsk.fusion, adsk.cam, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        pucks= ui.inputBox('What pucks would you like to remove?','Puck Selction')
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
            pucks=ui.inputBox('What pucks would you like to remove?','Puck Selction')
    while True:        
        
        pucks=pucks[0]
        pucks.split(' ')
        
        for i in pucks:
            if i[0].isalpha == False:
                ui.messageBox('Please type a valid puck number','PuckError')
                pucks=ui.inputBox('What pucks would you like to remove?','Puck Selction')
                continue
            else:
                
                break
            

 

0 Likes
430 Views
0 Replies
Replies (0)