FeatureScript TableData not effective.
hervé_pipon
Member Posts: 60 ✭✭
I write a FeatureScript which has to import a csv file :
export const CSV_Path = defineFeature(function (context is Context, id is Id, definition is map) precondition {
annotation {
"Name": "file"
}
definition.myPathCurve is TableData;My problem is that half the time the file is not read
The script starts correctly,
If I click again definition.myPathCurve.csvData == undefined
And on the next click it works .... and so on...
How can I make it works all the time ?
Tagged:
0
Comments
-
you are going to need to share an example.
It is likely that you are not waiting enough time for it to load the data. To test. just hit the green check box and wait a minute. if you go back in and reload it again and check box makes it work then its a bug. I suspect your issue is due to not waiting for the loading wheel to be finished0 -
@Jacob_Corder
I have both Part Studio View , and FeatureScript Notice View open at the same time.
When I click , I can read on FeatureScript Notice a message generated by my code that indicates that definition.myPathCurve.csvData == undefinedif (definition.myPathCurve.csvData == undefined) { println("Undefined Path Curve !"); return; }
There is no need to wait more...
0 -
It's actually a handling error.To save time, I leave the selection window open between each test!So when I click the 2nd time, it simply deselects the file
But as I'm only watching the FeatureScript Notice View, I did not take care of this.
Sorry for this wrong question
0
