I tried 'importtable()', but I can't get it to work.
/**Custom Code*/ treenode link = node("..>objectfocus+", c); importtable(Table(TB_Log),"U:/pmd/PerformanceAnalysis/Prep Output/Test.csv",1,1);
I tried 'importtable()', but I can't get it to work.
/**Custom Code*/ treenode link = node("..>objectfocus+", c); importtable(Table(TB_Log),"U:/pmd/PerformanceAnalysis/Prep Output/Test.csv",1,1);
Hello Paul,
Looking at the model you try to a create global variable to point to a table. This is a faster way of working but in this case not needed. You could just point to the string name of the table directly Table("HstMachineErrors").
Or if you want the other option to work there are 2 small mistakes:
If you fix this you can use Table(TB_Log) as table handler
Greetings,
Steven
Hi @Paul M4,
I think the table value needs to be a string. Everything else looks fine to me.
Table(TB_Log) //Not a string Table("TB_Log") //This should work
Hi @tanner.p,
Thanks for the response.
Defining TB_Log as string returns a incomprehensible error (for me). I think because I defined TB_Log as a global variable of type Tree Node which refers to a global table.
I tried changing Tree Node to String, but that resulted in another error.
I found tostring, but that doesn't seem to work either.
Any suggestions in this context? I included the model as well.
Coincidentally, I placed a breakpoint in the code hoping to get some more insight. While stepping over the importtable line, FlexSim just crashed all together. Any idea what that's about?
Regards,
Paul
I didn't realize that you were using TB_Log as a Global Variable that was pointing to the table. In this case, you'll need to do as Steven suggested and point specifically to the data node of the table. If you don't want to go that route, you can simply place the table name as a string in the code and have that work. I've updated your model to reflect the latter option.
13 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved