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.
Importing Data Points from a CSV File
rex_hanson Member Posts: 41 ✭✭
About a year ago I found a script or function called 3D CSV 1 that would read a csv file containing xyz data points and then it would create a data point for each point found in the file. I recently tried using this and now it won't regenerate. I compared the syntax of my previous files that worked to my current file that doesn't and I don't see anything different. I've searched for the 3D CSV 1 on the forum and I can't find it anywhere. Not sure how to get help on it or if there is a new / better way to import points from a data file. Hoping someone can point me in the right direction.
NeilCooke Moderator, Onshape Employees Posts: 4,809Found the issue. Onshape's default units is meters and unless there is a drop-down list in the custom feature to select the units of the CSV, it will always plot in meters. Your sample points have sizes of 500+ (I assume mm but Onshape does not know), which when converted to meters (500m) exceeds Onshape's maximum physical part size of 500m^3 (actually this is a Parasolid limitation, not ours).
Can you edit your CSV in a spreadsheet and divide every value by 1000? If not, I can get Philip to update his script.Director, Technical Services, EMEA6
When I open the link I get: 3D XYZ CSV Points and SplinesV4
First two lines of the script says this:
Not sure how I get help on making it work.
NeilCooke, I could try a different script, but I think the real issue is something with my file. The script I had found works for one set of data points but not my new set that was created from a cmm machine. I'm not sure who wrote the script and I'm not sure how to debug it. The only error message I get is that it doesn't regenerate when I select the "plot points" checkbox.
I found a few different feature scripts that create points and then fit splines through them. For now all I need is points. I didn't find anything that did just that.
Thanks for helping.
I've looked at my text file and the format appears to be correct. I'm thinking maybe it has to do with hidden characters associated with carriage return / line feeds or something like that. My original text files that work were created on a PC running windows. My new text file was imported from a Mac. On my Mac I don't have an editor that will show the special characters and I don't have access to the Windows computer because I recently retired and that Windows computer was at work.
Here is a link to my model:
Part Studio 2 works like it is supposed to work. It references the "New Profile.csv" import.
Part Studio(Data from Romer Arm) doesn't work. It references the data file "Quick Measure Data Point Capture.csv" import.
The goal of my project is to demonstrate the process for importing a CMM point cloud, surfacing that point cloud, and then subtracting it from CAD geometry created from sketches and extrudes. The end goal is to use a 3D printer to make parts that mate up to an existing part whose shape was digitized using a Romer arm. The basic process appears to be sound. My original models that regenerate without error use point data fabricated from a Creo model. My Romer arm example that fails to regenerate is trying to use data obtained from the Romer arm. I'm sure it is a simple syntax issue but I'm not seeing it.
Thank you very much for looking at this. I realize I'm not a paying customer. However, this project is for the students at NICC community college where I have volunteered to get their Romer arm working and then show the students how to use it in conjunction with their engineering technology lab.
I have to filter out this symbol in my csv file text
copy the symbol and paste it in your featuerscript code
Can you edit your CSV in a spreadsheet and divide every value by 1000? If not, I can get Philip to update his script.
I have tried to export the data with several different options in Excel. Tried Mac.csv, DOS.csv, and generic.csv. None of them resulted in a file that would work. So I'm obviously missing something.