Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

input string to setup sheet

0 REPLIES 0
Reply
Message 1 of 1
TechrimStandards
162 Views, 0 Replies

input string to setup sheet

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 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report