Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Sorting Variable Name
Christopher_Gania
Member Posts: 3 PRO
When I created feature script that import data from CSV then add to Variable Table, the arrangement are random. How can make the arrangement the way I wanted?
Here's the script:
Here's the script:
FeatureScript 1711;
import(path : "onshape/std/geometry.fs", version : "1711.0");
annotation { "Feature Type Name" : "CSV Configurator"}
export const importCSV = defineFeature(function(context is Context, id is Id, definition is map)
precondition
{
annotation { "Name" : "Table" }
definition.pointData is TableData;
}
{
var importedData = definition.pointData.csvData;
for (var i = 0; i < 11; i += 1)
{
setVariable(context, importedData[i][0], importedData[i][1]);
}
});
Tagged:
0
Answers