I am encountering some troubles when accessing a cell using Column index, and I think this may be a bug. I am trying to loop through the Row index column of my TableFile and in some cases (not always) I get this run time error:
I am currently using Plant Simulation 220.127.116.119. Unfortunately, I can not upload the model due to confidentiality restrictions. Has anyone encountered the same problem?
Thank you in advance
Solved! Go to Solution.
I cannot reproduce the problem. From your description it looks like a bug. Can you reproduce the effect in a smaller (non-confidential) model? Otherwise I suggest you contaxt your local support.
with both indexes on, it works.
What concerns me more is this expression ( s. arrow)
It seems as if the column [0,0] cannot be addressed with the value.
For what ever reason ( hidden chars ?).
E.g. a blank in the index addressing triggers the same debugger message.
Probably with [0,1] instead of ["Material",1] it will work.
After continuing working on my model it crashed again, so I suppose deleting and creating again the tables is not enough to solve the problem. As you proposed, I've made a simplified version of the model that reproduces the same error, but with another column.
To trigger the error, just execute the method mUpdate_PlantInfo which is inherited in the frame. In my case, the method not always crashes (execute it multiple times if necessary) and any time it does, it is not due to the same column.
Just for you to understand how the real model works, this method retrieves some dates and references from a database and updates the column and row indexes of the tables according to that. In this simplified example, the tDates and tCurrRefs tableFiles represent the data which is imported from the DDBB, and the tPlanning and tDemand tableFiles the tables to be updated.
Thank you again!
Hello Adrian Gestamp.
Thank you for reporting this issue and taking the time to create the simplified model.
We can reproduce the issue and we think that you in fact found a bug. We'll investigate it.
In the meantime, I recommend you contact GTAC and report this issue, so it's tracked in our system and we can contact you on the progress.
For the time being, you can work-around the issue by deactivating fast column index access.
Please try the following: Open the DataTables that cause the issue, i.e. the ones where you want to access the column by name. Select the column header row (row 0) by clicking on the header of that row (the text 'string'). Make sure the List ribbon is active in the toolbar, deactivate format inheritance by clicking 'Inherit Format', then click 'Edit Format', select the 'Data Type' tab, and uncheck 'Fast index access'.
Alternatively, you can set the FastAccessColumnIndex attribute of the relevant DataTables to false.
This is of course not a permanent solution and it decreases the performance slightly, but at least you can continue working.