View previous topic :: View next topic |
Author |
Message |
kdenney
Joined: 20 Nov 2014 Posts: 6
|
Posted: Thu Nov 20, 2014 11:01 pm Post subject: CSV import macro |
|
|
Hello,
First off, DPlot is great...nuff said.
I have a question regarding the import of csv data via macro. I plan to have many files with the same column format (X,Y,Z) and would like to generate a 3D surface contour. I can easily generate the graphs I need using either the excel plugin or manual import using File->New->3D Surface, but would like to autogenerate the graphs in the future. I thought the best way to do this would be using a macro. This is what I have so far:
Directory("C:\Path")
ForFilesIn("*.csv")
GetPreferences("Preferences")
FileSaveAs(1,".grf")
FileSaveAs("Portable Network Graphics",".png")
FileClose()
NextFile
It seems to do everything but read in the data correctly; it brings up the "Specify Columns to Plot" dialogue, and I check the appropriate boxes to specify which columns should be used for X and Y. However, it proceeds to generate an XY plot and seems to ignore the Z column (unless I specify to use it as the labels). Is there some way to let DPlot know that I am wanting to generate a 3D Surface plot from the data?
Many thanks for your help!
-kd |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Fri Nov 21, 2014 1:22 am Post subject: |
|
|
Before the ForFilesIn line add
FileType(11) _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
kdenney
Joined: 20 Nov 2014 Posts: 6
|
Posted: Fri Nov 21, 2014 9:05 am Post subject: |
|
|
Awesome! It works like a charm.
Thanks again!
-kd |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|