T O P I C R E V I E W |
aredart |
Posted - 09/14/2016 : 05:21:28 AM Origin Ver. and Service Release (Select Help-->About Origin): Operating System: Origin 2016
Dear Origin-Team,
I have two problems.
First, I would like to add a Graph Page to an existing Book: I would like to import an analyze my Data in one sheet and plot it in the next sheet in the same book. It is no problem to import, analyze and plot my Data, but the plot always appears in a new Book. I found out how to add a new Graphsheet per mouseclick, but how does it work with Origin C? Also I would like to add a Notesheet in the existing book, but the same problem occurs.
Second, I tried to call a function I wrote by myself (and added to 'System') in another Origin C-Skript, as if it were an original Origin-function. The function analyzes my data and does not need any extra variables. For example (this is taken from your documentation):
void example1() { Worksheet wks = Project.ActiveLayer(); wks.AddCol();
Column colA; colA.Attach(wks, 0); colA.SetFormula("5*(i-1)"); colA.ExecuteFormula(); }
Now I save example1() in the System-folder and write a new script like this:
void example2() { Worksheet wks = Project.ActiveLayer(); if(!wks) { return; } else { example1() } }
Its very short, but I hope you can understand how it was meant. I tried it in many different ways, but it never worked.
I really appreciate any help and readily answer any question.
|
1 L A T E S T R E P L I E S (Newest First) |
yuki_wu |
Posted - 09/18/2016 : 02:56:42 AM Hi,
1. Answer to question 1 If you want to add notes as sheet, you can go to this page: http://www.originlab.com/doc/OriginC/ref/Worksheet-EmbedNote If you want to add graph as sheet, you can go to this page: http://www.originlab.com/doc/OriginC/ref/Worksheet-EmbedGraph
2. Answer to question 2 You'd better create a header file and then include this header file in your OC file. For example, you can save example1() as a header file example.h in the same folder with your OC file. In your OC file, include this header file by
#include "example.h" Hope it can be some help.
Regards, Yuki OriginLab
|
|
|