Importing CSV Data

Importing CSV Data

Anonymous
Not applicable
1,055 Views
3 Replies
Message 1 of 4

Importing CSV Data

Anonymous
Not applicable

Hi, i create a simple python script to import a csv. 

I use this sintax outside spyder and it work but when i try to use it in sphyder it gave me some problem.

Does the sintax from some "file" import "class"  work in fusion 360?DataHelper2.jpg
DataHelper1.jpg

0 Likes
1,056 Views
3 Replies
Replies (3)
Message 2 of 4

KrisKaplan
Autodesk
Autodesk

Use the relative import syntax when importing modules relative to your scripts path.  For example, "from . import DataHelper".  The reason for this is that your module is not being run as the __main__ module when run in Fusion, so the containing folder is not in sys.path by default (it should not be, and relative imports isolates your modules from other script's sub-modules with the same name).

 

Kris



Kris Kaplan
0 Likes
Message 3 of 4

xiaodong_liang
Autodesk Support
Autodesk Support
0 Likes
Message 4 of 4

daniel_lyall
Mentor
Mentor

here is a import/export .csv that works 

http://forums.autodesk.com/t5/api-and-scripts/csv-script/td-p/5925524/page/3


Win10 pro | 16 GB ram | 4 GB graphics Quadro K2200 | Intel(R) 8Xeon(R) CPU E5-1620 v3 @ 3.50GHz 3.50 GHz

Daniel Lyall
The Big Boss
Mach3 User
My Websight, Daniels Wheelchair Customisations.
Facebook | Twitter | LinkedIn

0 Likes