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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 User Interface and plotting Graphs

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
achu6393 Posted - 06/22/2016 : 08:59:18 AM
Origin Ver. and Service Release: B9.2
Operating System: Win 7

I would like to have a User Interface window which has a graph and a set of drop down menues where I can choose my x axis and y axis. And a push button which plots the new graph. This should also be recurssive as in, even after ploting a graph the Option should be available to choose my next plot. Is this possible using LabTalk?

Thanks in advance.
Akki
12   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 07/25/2016 : 2:25:24 PM
Hi Akki,

> What would be the Minimum verision of Origin required for this Feature to work

Apps (having 32x32 pixel icon) became available since Origin 2016 (internal version=9.3).
So, earlier versions need to rely on the mechanism of the custom toolbar, or of the button
on the window instead of the apps.

Regarding the minimum version of a specific LabTalk code, it is often hard to tell unless
you actually test to make sure. If you have a specific targeted minimum version in mind,
if I were you, I would develop the code on the earliest version of Origin.

Does it make sense?

--Hideo Fujii
OriginLab
achu6393 Posted - 07/25/2016 : 04:46:48 AM
Hey Hideo,

What would be the Minimum verision of Origin required for this Feature to work? because I couldn't find such Option in my Version (OriginPro 2015 9.2.214 and Win 7 OS) eventhough I can find many applications created and published in the file Exchange Portal with an earlier verision.

Akki.


such coding! much wow!
Hideo Fujii Posted - 07/22/2016 : 3:54:12 PM
Hi Akki and visitors to this thread,

Here is a tutorial("Create and Update Apps for Origin") how to make an Origin package file
(.OPX) for an App:

http://www.originlab.com/doc/Tutorials/Create-Update-Apps

You need to prepare a 32x32 PNG file for your icon before making an icon. If you don't have such
one, you can search with keywords like "free 32x32 icons"; then you will find tons of samples.

Once you make an OPX file, you can drag-and-drop it to your Origin workspace to install.

Please try.

--Hideo Fujii
OriginLab
achu6393 Posted - 07/07/2016 : 05:43:26 AM
Hi Hideo,

Thanks a lot! It would be great if you could share that Information.
And yeah, the "Use large Icons" didn't work very well. kinda zoomed everything!

Thanks again for your help.
-akki.


such coding! much wow!
Hideo Fujii Posted - 07/06/2016 : 09:54:06 AM
Hi Akki,

> It says that the Buttons can only be 16 x 16 Pixels. Can this be changed? Can i have a larger button?

Tool buttons have that size. However, "Apps" in Origin (2016 or later) have a larger icon with 32x32 pixels.
OriginLab is planning to publish a document how to create a user's own App which doesn't have to be
published on our File Exchange site. I will let you know in this thread once it is published.

Best,

--Hideo Fujii
OriginLab

P.S. You can show larger tool button icons by "View: Toolbars" menu, "Options" tab, and checking the
"Use Large Icons" checkbox, though this enlarges ALL tool buttons.
achu6393 Posted - 07/05/2016 : 03:49:53 AM
quote:
Originally posted by Hideo Fujii

Hi achu6393,

http://www.originlab.com/doc/Origin-Help/UserDef-Custom-Toobar-Button

Good luck.

--Hideo Fujii
OriginLab



Just a follow up question with respect to the link.. It says that the Buttons can only be 16 x 16 Pixels. Can this be changed? Can i have a larger button?

-Akki

such coding! much wow!
Hideo Fujii Posted - 07/01/2016 : 4:04:06 PM
Hi achu6393,

> I found a Feature in Origin where your can have your own customized toolbar which can run sections of
> your .ogs files. Is it possible that I code and call this Feature through labtalk programming?

Why not? Sure, you can call the same script from a tool button in a toolbar. The difference
should be minor - one from a button in a graph may be supposed to do something from/to the graph,
though one from a tool button may be considered as a general operation to any graph window.
(You can limit the applicable target of the tool button based on the window types like graphs,
worksheets, matrices, etc.)

http://www.originlab.com/doc/Origin-Help/UserDef-Custom-Toobar-Button

Good luck.

--Hideo Fujii
OriginLab
achu6393 Posted - 07/01/2016 : 07:00:01 AM
quote:
Originally posted by Hideo Fujii

Hi achu6393,

> why the snippet is repeated 4 times?

ha ha, just because I didn't want to test my snippet for more than 4 plots.... change it to 999, or like something     Sorry!

--Hideo



haha.. No probelm. I tried your idea and it worked perfectly. I just have one more question. I found a Feature in Origin where your can have your own customized toolbar which can run sections of your .ogs files. Is it possible that I code and call this Feature through labtalk programming?

such coding! much wow!
ralphysunsmith Posted - 06/27/2016 : 07:32:59 AM
quote:
Originally posted by Hideo Fujii

Dear Akki,

You can place a button in the graph window or in a layout window. The button can invoke a script which
contains a "getN" command with @BB option to select a dataset to make a plot. See the sample screen below:



This demonstrates a button which cincludes the following snippet:
///////////////////////////////////////////
nadd=0;
Repeat 4{
  isOK=0;
  string crname$ = "Select Dataset";
  {
  getn (Dataset) crname$:@BBColumn (Select a dataset to add a plot);
  isOK=1;
  }
  if(isOK==0) Break;  //if Cancel button is pressed
  plotxy iy:=crname$ plot:=202 ogl:=[Graph1]1!; //add a plot to Graph1
  nadd++;
  window -a Graph1;
  legendupdate;  //update legend
  isOK=1;
  doc -uw; clr; //refresh window
}
if(isOK==0) type -b $(nadd) datasets are added.;
///////////////////////////////////////////

If you use a Layout window, you can place more than one graphs, images, worksheets there.

Hope this helps.

--Hideo Fujii
OriginLab



Hi Hideo Fujii,
Thanks for this info, me and my friend who are lost about this subject will benefit greatly.

[url=http://wollongongbuilderslisting.com.au]wollongong builders[/url]
Hideo Fujii Posted - 06/23/2016 : 09:40:23 AM
Hi achu6393,

> why the snippet is repeated 4 times?

ha ha, just because I didn't want to test my snippet for more than 4 plots.... change it to 999, or like something     Sorry!

--Hideo
achu6393 Posted - 06/23/2016 : 06:07:46 AM
Thanks a lot Hideo! I will try your idea into my program. But could you tell me why the snippet is repeated 4 times?

such coding! much wow!
Hideo Fujii Posted - 06/22/2016 : 1:40:33 PM
Dear Akki,

You can place a button in the graph window or in a layout window. The button can invoke a script which
contains a "getN" command with @BB option to select a dataset to make a plot. See the sample screen below:



This demonstrates a button which cincludes the following snippet:
///////////////////////////////////////////
nadd=0;
Repeat 4{
  isOK=0;
  string crname$ = "Select Dataset";
  {
  getn (Dataset) crname$:@BBColumn (Select a dataset to add a plot);
  isOK=1;
  }
  if(isOK==0) Break;  //if Cancel button is pressed
  plotxy iy:=crname$ plot:=202 ogl:=[Graph1]1!; //add a plot to Graph1
  nadd++;
  window -a Graph1;
  legendupdate;  //update legend
  isOK=1;
  doc -uw; clr; //refresh window
}
if(isOK==0) type -b $(nadd) datasets are added.;
///////////////////////////////////////////

If you use a Layout window, you can place more than one graphs, images, worksheets there.

Hope this helps.

--Hideo Fujii
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000