test-explore-tables.jsonā¢1.59 kB
{"method":"tools/call","params":{"name":"project_execute","arguments":{"projectId":"S000009result_1278407893","code":"# Esplora le tabelle disponibili in Visum\nimport sys\nresult = {}\ntry:\n # 1. Verifica se esiste Graphics per accedere a MainWindow\n if hasattr(visum, 'Graphics'):\n result['has_Graphics'] = True\n graphics = visum.Graphics\n \n # Cerca metodi relativi a tabelle/windows\n graphics_methods = [m for m in dir(graphics) if 'Table' in m or 'Window' in m or 'List' in m]\n result['Graphics_table_methods'] = graphics_methods\n else:\n result['has_Graphics'] = False\n \n # 2. Verifica se esiste un modo di listare le finestre/tabelle aperte\n visum_methods = [m for m in dir(visum) if not m.startswith('_')]\n table_methods = [m for m in visum_methods if 'Table' in m or 'List' in m or 'Window' in m]\n result['visum_table_methods'] = table_methods[:30] # Prime 30\n \n # 3. Prova ad accedere a liste/tabelle specifiche\n # Cerca metodi che potrebbero dare accesso alle tabelle\n export_methods = [m for m in visum_methods if 'Export' in m or 'Save' in m]\n result['export_methods'] = export_methods[:20]\n \n # 4. Verifica attributi di IO\n if hasattr(visum, 'IO'):\n io = visum.IO\n io_methods = [m for m in dir(io) if 'Export' in m or 'Save' in m or 'Table' in m]\n result['IO_export_methods'] = io_methods\n \nexcept Exception as e:\n result['error'] = str(e)\nresult","description":"Esplora API per tabelle e export"}},"jsonrpc":"2.0","id":13}