The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Script works in origin but not from a DDE
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

glishlab

USA
8 Posts

Posted - 09/30/2003 :  5:30:24 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Anyone who wants to put in their 2 cents it is greatly appreciated:

I have been doing a good amount of work with origin and labview and have been pretty succesfuly but I have recently run into a hurdle that really perplexes me. I am now doing 3d plots, which are a pain in the butt to being with. I created a template to plot with and in labview I execute a script that plots just fine with the 3d plot template. However it brings up vertical drop lines that I CAN NOT turn off with the set %B -lv 0 command. I have been able to change the type of symbol... the size no problem. But I can not get rid of the damn z axis vertical drop lines and I can not change the connectivity. The script itself works becuase I have exectued in origins labtalk script editer. I am really at a loss why the script works one place and not another. Any thoughts?

below is the basic code that is executed from a dde server in labview after data is put into an active worksheet:
wks.col$(3).type=4; // set 3rd column to X
wks.col$(5).type=6;// set 5th column to Z
worksheet -s 5 0 5 0; // select z column
%B=%C; // store worksheet selection in B for later
win -t plot 3dpos.otp //this plot template is 3d scatter plot
layer -i %B; // include worksheet selection (%B) into layer
set %B -lv 0; // remove veritcal droplines
set %B -l 1; // connect the dots
set %B -k 0; // remove symbols
label -n Title

I really appreciate your time and and thoughts you may have.

Thank you,

Desmond Kaplan

cpyang

USA
1407 Posts

Posted - 09/30/2003 :  9:10:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It seems that you have a template 3dpos, why not change template to make the plot in whatever way you want and just plot into that template using layer -i? I am not sure all those set %B etc commands can work well in 3D plots.

CP


Go to Top of Page

glishlab

USA
8 Posts

Posted - 10/01/2003 :  1:16:17 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I did try that and it does not work.

I think the %B commands work because I can remove the symbols no problem.
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 10/01/2003 :  8:09:06 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Does the script work if you run it from a script file or macro?

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 10/01/2003 8:09:38 PM
Go to Top of Page

glishlab

USA
8 Posts

Posted - 10/08/2003 :  11:03:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Yes, the script runs correctly if run from the script file.
I was just trying to have a way to automate from labview becuase the data that I am sending in is in an odd format. So I format it in labview and then send it in and wanted to automate the graphing portion.
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 10/08/2003 :  5:46:42 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Desmond,

I don't know off hand why your script works from a script file but not from LabView, but if that's the case why not just launch the script file from LabView with run.file or run.section?

Mike Buess
Origin WebRing Member
Go to Top of Page

cpyang

USA
1407 Posts

Posted - 10/09/2003 :  07:53:55 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Also, it is still best not to use script to format a graph. If using template didn't work for you, maybe you can use an OPJ? You can prepare the graph exactly as needed into an OPJ, then from DDE, you open this OPJ and replace the data in the worksheet, then the graph should automatically update.

CP


Go to Top of Page

glishlab

USA
8 Posts

Posted - 10/12/2003 :  8:18:23 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you Mike that is the command I was looking for.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000