Hellow fellows. I´m experieced in CAD 2D & 3D, and familarized with AutoCAD, Inventor, SolidWorks, CATIA 5 modelling and customization, and a bit of NX11 APT and Cimatron GPP. But new in Fusion environment and AI. I know "chongas" (nothing) of Python coding, but I learnt Fortran in past, and a bit of C procedural, CATIA customization and Inventor Ilogic. I observed that Fusion don´t have way of put dropbox itens for text variables, directly in the "Change Parameters" command, and I feel lack of it. Then I ask Cloude Online (acess 01.08.2026) and asked it to generate a Python code for permit a text user variable to be selected by a dropbox list. After a first creation bugged, and a 2nd creation ok, it generated the list bellow/attached. Please test it and inform me if it´s ok for u or supply any need of yours. RegardsCarlos -------------------- init------- import adsk.core, adsk.fusion, traceback# Nome do parametro de usuario que sera alteradoPARAM_NAME = 'Material_peca'# Opcoes que aparecerao no dropdownOPCOES = ['Aço', 'Madeira', 'Alumínio']# Handlers precisam ser mantidos em memoria (referencia global)handlers = []app = adsk.core.Application.get()ui = app.userInterfacedef get_user_param(design: adsk.fusion.Design, name: str):"""Retorna o UserParameter pelo nome, ou None se nao existir."""for p in design.userParameters:if p.name == name:return preturn Noneclass CommandExecuteHandler(adsk.core.CommandEventHandler):def notify(self, args):try:cmd = args.commandinputs = cmd.commandInputsdropdown = inputs.itemById('materialDropdown')selecionado = dropdown.selectedItem.namedesign = adsk.fusion.Design.cast(app.activeProduct)if not design:ui.messageBox('Nenhum documento de Design ativo.')returnparam = get_user_param(design, PARAM_NAME)if not param:ui.messageBox(f'Parâmetro "{PARAM_NAME}" não encontrado no arquivo.')return# Parametros de texto usam a propriedade textValue, NAO expression/valueparam.textValue = selecionadoui.messageBox(f'Parâmetro "{PARAM_NAME}" atualizado para: {selecionado}')except:if ui:ui.messageBox('Falhou:\n{}'.format(traceback.format_exc()))class CommandCreatedHandler(adsk.core.CommandCreatedEventHandler):def notify(self, args):try:cmd = args.commandinputs = cmd.commandInputsdesign = adsk.fusion.Design.cast(app.activeProduct)valor_atual = Noneif design:param = get_user_param(design, PARAM_NAME)if param:# Le o valor atual usando textValue (parametro de texto)valor_atual = param.textValuedropdown = inputs.addDropDownCommandInput('materialDropdown','Material da Peça',adsk.core.DropDownStyles.TextListDropDownStyle)for opcao in OPCOES:is_selected = (opcao == valor_atual)dropdown.listItems.add(opcao, is_selected)# Se o valor atual nao estiver na lista de opcoes, seleciona o primeiroif valor_atual not in OPCOES and dropdown.listItems.count > 0:dropdown.listItems.item(0).isSelected = Trueon_execute = CommandExecuteHandler()cmd.execute.add(on_execute)handlers.append(on_execute)except:if ui:ui.messageBox('Falhou:\n{}'.format(traceback.format_exc()))def run(context):try:cmd_defs = ui.commandDefinitions# Remove definicao antiga, se existir, para evitar duplicidadeold_cmd_def = cmd_defs.itemById('cmdAlterarMaterialPeca')if old_cmd_def:old_cmd_def.deleteMe()cmd_def = cmd_defs.addButtonDefinition('cmdAlterarMaterialPeca','Alterar Material da Peça','Define o valor do parâmetro Material_peca a partir de uma lista.')on_created = CommandCreatedHandler()cmd_def.commandCreated.add(on_created)handlers.append(on_created)cmd_def.execute()# Mantem o script "vivo" ate o comando ser concluidoadsk.autoTerminate(False)except:if ui:ui.messageBox('Falhou:\n{}'.format(traceback.format_exc()))---------- end ------