Page 1 of 1

data points command

Posted: Mon Jun 29, 2009 11:14 am
by seppli
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

Posted: Mon Jun 29, 2009 8:44 pm
by DPlotAdmin
SymbolType(1,<anything other than 0>)

Posted: Tue Jun 30, 2009 2:33 am
by seppli
Thank you very much for your help! It's great to have such a nice support here!

Cheers

Saving Problems

Posted: Fri Jul 03, 2009 6:29 am
by seppli
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

Posted: Fri Jul 03, 2009 2:34 pm
by DPlotAdmin
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) & ")]")

Posted: Tue Jul 07, 2009 4:35 am
by seppli
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

Posted: Tue Jul 07, 2009 10:57 am
by DPlotAdmin
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.

Posted: Wed Jul 08, 2009 3:22 am
by seppli
Yes that's why I was a bit confused, because my plot has a first title line... But thank you for your help and your nice support!

ContourLevels Command with Variables

Posted: Wed Jul 29, 2009 8:13 am
by seppli
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

Posted: Wed Jul 29, 2009 9:12 am
by DPlotAdmin
All of the commands sent to DPlot via DPlot_Command are character strings. So this will work:

Code: Select all

ret=DPlot_Command(doc,"[ContourLevels(20,0,1000)]")
but the following will give an error, as you've already found:

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)]")
(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

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) & ")]")


Posted: Thu Jul 30, 2009 10:29 am
by seppli
ah ok, thank for your help! It is now perfectly working :-)