DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CSV import macro

 
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions
View previous topic :: View next topic  
Author Message
kdenney



Joined: 20 Nov 2014
Posts: 6

PostPosted: Thu Nov 20, 2014 11:01 pm    Post subject: CSV import macro Reply with quote

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
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Fri Nov 21, 2014 1:22 am    Post subject: Reply with quote

Before the ForFilesIn line add

FileType(11)
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kdenney



Joined: 20 Nov 2014
Posts: 6

PostPosted: Fri Nov 21, 2014 9:05 am    Post subject: Reply with quote

Awesome! It works like a charm.

Thanks again!

-kd
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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