data points command
Moderator: DPlotAdmin
data points command
Hi there
I was searching for the command, which shows the data points in a 3d surface plot (black, rectangular points), in the manual, but I somehow could not find it. Does somebody has found it?
Thanks for your help.
Cheers seppli
I was searching for the command, which shows the data points in a 3d surface plot (black, rectangular points), in the manual, but I somehow could not find it. Does somebody has found it?
Thanks for your help.
Cheers seppli
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
Saving Problems
I'm sorry, but I have one more question.
I'm using for the xyz surface plot the script which is included in dplotlib.xla. At the end of the script I want to save the plot, which I generated, with this command:
ret = DPlot_Command(doc, "[Directory("C:\My Documents\")]")
ret = DPlot_Command(doc, "[FileSaveAs(1,"|TITLE1||TITLE2|.grf")]")
but this is ending in a error message like "Syntax error". What I'm doing wrong?
many thanks in previous
seppli
I'm using for the xyz surface plot the script which is included in dplotlib.xla. At the end of the script I want to save the plot, which I generated, with this command:
ret = DPlot_Command(doc, "[Directory("C:\My Documents\")]")
ret = DPlot_Command(doc, "[FileSaveAs(1,"|TITLE1||TITLE2|.grf")]")
but this is ending in a error message like "Syntax error". What I'm doing wrong?
many thanks in previous
seppli
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
The quotation marks are fouling things up. Quotation marks are used to delineate the entire command string, as well as any character string arguments within a command.
So instead of this:
ret = DPlot_Command(doc, "[Directory("C:\My Documents\")]")
you'll need to do something like this:
ret = DPlot_Command(doc, "[Directory(""C:\My Documents\"")]")
which is more or less equivalent to this (which may make it clearer):
ret = DPlot_Command(doc, "[Directory(" & chr$(34) & "C:\My Documents\" & chr$(34) & ")]")
So instead of this:
ret = DPlot_Command(doc, "[Directory("C:\My Documents\")]")
you'll need to do something like this:
ret = DPlot_Command(doc, "[Directory(""C:\My Documents\"")]")
which is more or less equivalent to this (which may make it clearer):
ret = DPlot_Command(doc, "[Directory(" & chr$(34) & "C:\My Documents\" & chr$(34) & ")]")
Visualize Your Data
support@dplot.com
support@dplot.com
Ah yes thank you for your help. As you see I'm not a very experienced vba programmer. It is now perfectly working. But if I am using replaceable Parameters in the FileSiveAs command like "|TITLE1|" I get an error message: "Null result for replaceable parameter |TITLE1| in FileSaveAs command. Why?
have a nice day
seppli
have a nice day
seppli
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
The error indicates that your plot has no first title line... except that's not correct. I tried an example just now and get the same message with a plot that definitely has a title. I obviously fouled something up in a recent release. Sorry for the trouble, will fix this in the next release.
Visualize Your Data
support@dplot.com
support@dplot.com
ContourLevels Command with Variables
Thanks for the new release!
I'm sorry to disturb you again, but i have one more question regarding my excel macro.
I'm using a surface plot, and I want to force the countour levels with the following command: [ContourLevels(a,b,c)] a,b,c are variables defined as Public Integer in an other Sub. I always get en error when I use these variables in the command, when I put numbers in it, it works.
Can you help me? Thanks and have a nice day.
seppli
I'm sorry to disturb you again, but i have one more question regarding my excel macro.
I'm using a surface plot, and I want to force the countour levels with the following command: [ContourLevels(a,b,c)] a,b,c are variables defined as Public Integer in an other Sub. I always get en error when I use these variables in the command, when I put numbers in it, it works.
Can you help me? Thanks and have a nice day.
seppli
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
All of the commands sent to DPlot via DPlot_Command are character strings. So this will work:
but the following will give an error, as you've already found:
(In this case you aren't really sending the variables a, b, c, you're sending the character string "a,b,c")
What you want is something like this:
Code: Select all
ret=DPlot_Command(doc,"[ContourLevels(20,0,1000)]")
Code: Select all
Dim a as Long
Dim b as Double
Dim c as Double
a=20
b=0
c=1000
ret=DPlot_Command(doc,"[ContourLevels(a,b,c)]")
What you want is something like this:
Code: Select all
Dim a as Long
Dim b as Double
Dim c as Double
a=20
b=0
c=1000
ret=DPlot_Command(doc,"[ContourLevels(" & str$(a) & "," & str$(b) & "," & str$(c) & ")]")
Visualize Your Data
support@dplot.com
support@dplot.com