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
 Last Sheet in Workbook
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

DrMK

Germany
12 Posts

Posted - 03/19/2020 :  07:08:49 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin 2019b (32-bit)
9.6.5.169
Windows 10

Hello, I am searching for a command/variable to delete the last sheet in a workbook.

I just found __LASTWKS$ which is the last workbook. There has to be the same for the last worksheet.

Hope somebody can help me.





Matej

aplotnikov

Germany
169 Posts

Posted - 03/19/2020 :  08:45:29 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
layer -d $(page.nlayers);
Go to Top of Page

DrMK

Germany
12 Posts

Posted - 03/19/2020 :  09:55:04 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by aplotnikov

layer -d $(page.nlayers);




Thank you again. As it seems that you are very familiar with such commands I will ask you directly some more questions.

I wrote a script which plots different data from different sheets into one graph. The number of sheets and also the number of columns in a sheet isn't fixed and varies from time to time.

(Script: win -c UI53Chargennummern;

string fPath$ = %@BAnwenderdateien\;
string fname$ = fPath$ + "UIPlot53.otpu";
doc -a %(fname$);


win -a UI53;
loop (ii, 4, page.nlayers)
{plotxy iy:=$(ii)!(?,1:24) plot:=200 color:=$(ii) ogl:=[UI53Chargennummern];};
win -a UI53Chargennummern;)

UI53 is the name of the workbook
UI53Chargennummern is the name of the graph
UIPlot53.otpu is the template for the graph

Now I've got some problems with the design of the curves:

1. I want that each curve has a different color, with color=$(ii) I get the same color for some data if more than one dataset is in a sheet. Is there any possibilty to tell Origin to use the next color which isn't used yet?

2. Can I design the plot of each sheet individually? For example plots from sheet x are dashed and plots from sheet y are solid? In the plotxy function I couldn't find a possibility to set the line style. Only afterwards for example with the function
set name -d style#
but with this function I'Ve got also problems to sepcify the data on which I want to apply the function.

3. Is there a possibilty to set the transparency of the lines in a script?

Sorry for a lot of questions but it would help me a lot if you could help me like with my questions before. If you have some questions feel free to ask!

Thank you



Matej
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