mjL Posted January 30, 2015 Share Posted January 30, 2015 Hey guys, I'm trying to look for references of animations driven with external data like .xls documents (or any other data files) for example and I'm not having much luck finding anything. If anyone could point me in the direction of any papers, videos, example files or references it would be really helpful, thank you. Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted January 30, 2015 Share Posted January 30, 2015 Python has some handy tools for reading data from CSV which you can export from Excel. I've used it for several projects. https://docs.python.org/2/library/csv.html Hopefully you know some Python otherwise this will be a challenging project. Quote Link to comment Share on other sites More sharing options...
edward Posted January 30, 2015 Share Posted January 30, 2015 You can also read .csv files using the Table Import SOP. 1 Quote Link to comment Share on other sites More sharing options...
mjL Posted January 31, 2015 Author Share Posted January 31, 2015 Thanks for the help guys, my python knowledge is very poor so I'll be careful of getting into any methods that I can't problem solve at this time. Although this is a good reason to push myself I suppose... Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted February 2, 2015 Share Posted February 2, 2015 You can also read .csv files using the Table Import SOP. Nice! I wasn't aware of such a thing. Has that been around a long time cause I totally missed it? Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted February 2, 2015 Share Posted February 2, 2015 I just checked it out, that's a sweet node. Ironically they used Python and the csv module that I linked to above. import csv # Fetch our node's parameters. fname = node.parm('file').eval() usemaxrows = node.parm('usemaxrows').eval() maxrows = node.parm('maxrows').eval() nattrib = node.parm('numattrib').eval() csvfile = open(fname) sample = csvfile.read(4096) dialect = csv.Sniffer().sniff(sample) has_header = csv.Sniffer().has_header(sample) csvfile.seek(0) reader = csv.reader(csvfile, dialect) Quote Link to comment Share on other sites More sharing options...
edward Posted February 3, 2015 Share Posted February 3, 2015 Yes, but now mjL doesn't need to touch Python. EDIT: I think the Table Import SOP was added late H11 or so. Probably not noticeably new until H12. Quote Link to comment Share on other sites More sharing options...
mjL Posted February 22, 2015 Author Share Posted February 22, 2015 Yup, the TableImport SOP was all I needed Thanks again Quote Link to comment Share on other sites More sharing options...
breadbox Posted April 27, 2015 Share Posted April 27, 2015 Does anyone have any working sample CSV files they can share? I'm looking to import some flight tracking data, but I am not sure how to format the CSV files correctly for use with the Table Import? Id like to also use the lat / long to sphere function but should they be one column in the CSV? I set the column to 6 because in my file that is the start of the lat/long but the results are still looking odd. attached is my .csv, but had to change to .txt to upload. Data00_019.txt 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.