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
 Using plotvm on multiple sheets after ascii import
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

PaulHe

Germany
2 Posts

Posted - 04/09/2019 :  09:33:31 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I am trying to import multiple ascii files into separate sheets and plot a contour graph of all of them. If I execute the plotvm function as follows after import of each file, it always plots the first file:

plotvm irng:=1! format:=xacross rowpos:=selrow1 colpos:=selcol1

I tried to execute a loop after importing all files (here for 30 sheets):

loop(ii,1,30) {
page.active = ii;
plotvm irng:=ii! format:=xacross rowpos:=selrow1 colpos:=selcol1
}

But it does not work. Putting irng:=ii of irng:=<active> also does not work. How can I pass the active worksheet to be plotted to the plotvm function?

Thank you!

Edited by - PaulHe on 04/09/2019 09:35:09 AM

yuki_wu

896 Posts

Posted - 04/10/2019 :  02:46:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Please try this:

int nsheets = 1;
doc -e LW {
	plotvm irng:=[%H]$(nsheets)! format:=xacross rowpos:=selrow1 colpos:=selcol1;
	nsheets++;
}


https://www.originlab.com/doc/LabTalk/guide/Looping-Over-objs#Looping_over_Workbooks_and_Worksheets

https://www.originlab.com/doc/LabTalk/ref/Document-cmd#-e_object_.7Bscript.7D.3B_Execute_the_given_script_for_all_objects

Regards,
Yuki
OriginLab

Edited by - yuki_wu on 04/10/2019 02:46:58 AM
Go to Top of Page

PaulHe

Germany
2 Posts

Posted - 04/25/2019 :  11:28:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you, this works perfect!

Regards,
Paul
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