MVP 2022 Flex727 Posted July 5, 2014 MVP 2022 Report Share Posted July 5, 2014 I ran across an interesting problem today. While I was able to figure it out and correct it fairly easily, I think it points to an underlying problem with how VisiLogic is dealing with Data Tables. Here is what happened: I have a project I was modifying for another use. In it I have a Data Table with 3 columns. Part of the project modification involved editing column 3 and adding a column 4. In another project I had already made a similar modification and had some logic to write data to the modified Data Table, so I copied the logic from the second project to the first after modifying the Data Table in the first, but the Write Row to Data Table function block reversed the last two items. I confirmed that the Data Table in both projects had the exact same name, exact same number of columns, each column had the exact same name, and each column was of the exact same data type, but no matter what I did, copying the function block inexplicably reversed the last two items (NAME and EVENT columns in the attached picture). The problem turned out to be that when I edited the Data Tables in the two different projects, I went about it very slightly differently. When I inserted a column in one of them I did "Insert Before" and in the other I did "Insert After". That had the result that Visilogic identified them internally as reversed and thus reversed the columns in the Write Row function block. There is no external indication that VisiLogic is using some other method to identify columns other than the column name, but it does. In my opinion, this is poor programming practice - if VisiLogic is going to identify the columns by something other than the assigned column name, then it needs to be indicated and that is the indicator that should be selected in the Write Row function block (labeled "Destination (Cell)". Quote Link to comment Share on other sites More sharing options...
Eyal Koren Posted July 6, 2014 Report Share Posted July 6, 2014 Hi. First of all, there are no pictures attached to this post. Second, please send the applications for further investigation to support@unitronics.com Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted July 6, 2014 Author MVP 2022 Report Share Posted July 6, 2014 I see what happened - the file was too big, but it was only 50K. Any idea why I'm limited to a 11.04KB file size on uploads? Almost anything reduced to that size is unusable. I can't upload the applications without going back and re-creating the whole event and I really don't have time for that. The main issue is that VisiLogic refers to Data Table column internally by something other than the name of the column and there is no indication that is the case when the programmer is working with VisiLogic. If a Data Table is edited such that columns get re-positioned, but everything looks identical to the user, some functions will not work as expected (such as copying the Write Row to Data Table function block from another program with a seemingly identical Data Table. Quote Link to comment Share on other sites More sharing options...
Eyal Koren Posted July 6, 2014 Report Share Posted July 6, 2014 Next time, try exporting the data table from one application and import it to the other. The structure is moved easily and without any implementation efforts. You can do that from the data tables window. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted July 6, 2014 Author MVP 2022 Report Share Posted July 6, 2014 Good suggestion, thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.