[Uw...] Posted September 14, 2023 Share Posted September 14, 2023 Hello, can anyone tell me how to read the contents of a cell in the table? gom.script.table.edit_cell gom.script.table.insert_row_before gom.script.table.delete_row gom.script.table.insert_column_behind gom.script.table.delete_column gom.script.sys.save_table_style gom.script.table.switch_template Link to comment Share on other sites More sharing options...
[Ja...] Posted September 15, 2023 Share Posted September 15, 2023 Uwe, you need to approach this the other way round. The table is displaying variables , not storing them. Unless you really have just written fixed text in the cell, which i cannot imagine nor can you access anyway. If its really fixed text then best to drive this by project keyword which is then accessible by script. Therefore you need to see what is driving this cell, say an element keyword , this value can then be accessed via the element in scripting. I hope this makes some sense. Link to comment Share on other sites More sharing options...
[Uw...] Posted September 15, 2023 Author Share Posted September 15, 2023 Hello James, thank you for your answer. I understood the keywords thing, but I still have no idea how to implement my test. I'm looping through all the rows in column 5 from row 1 to 60 and now I want to check if the keyword has a specific value. # -*- coding: utf-8 -*- import gom i = 0 while i <= 60: if gom.script.table.edit_cell (cell_content='\n$format (user_E_01_1_1, ".0", show_unit=false, date_format=\'dd.MM.yyyy\')$', element_type='inspection_dimension_scalar', indices=[{'column': 5, 'row': i}])== 0 : ... i += 1 The keywords also vary in each line. Link to comment Share on other sites More sharing options...
[Ja...] Posted September 21, 2023 Share Posted September 21, 2023 Hi uwe , sorry if unclear. Dont attempt to loop through the table. This cannot extract values. Loop through the elements that are driving the table. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in