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
 Origin Forum
 finding the graph
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2 Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Piasecki

Poland
Posts

Posted - 07/23/2004 :  12:46:15 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Is there any way of finding some graph among the many in the project using some criteria, e.g. the text in the graph title?

hajo_old

Germany
141 Posts

Posted - 07/24/2004 :  12:27:06 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello, Piasecki

As I know, there's no menu action for that. You'll have to code that on your own in OriginC (or LabTalk).

If you aren't able to figure that out on your own, let me know and I'll try to post some basic code here (haven't one yet..).

You'll probably have to deal with the OriginC object Project.Pages or Project.GraphPages and search for the property name (GetName) as an starting point.


So far
Hajo

-- --
Dipl.-Ing. Hans-Joerg Koch
SiemensVDO Automotive
Regensburg


Edited by - hajo on 07/24/2004 12:32:53 PM

Edited by - hajo on 07/24/2004 12:38:44 PM
Go to Top of Page

Piasecki

Poland
Posts

Posted - 07/26/2004 :  1:23:16 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It would be very nice of you, but pls remember that I have no idea about the C programing nor the LabTalk!
Thanking in advance
Eryk

quote:

Hello, Piasecki

As I know, there's no menu action for that. You'll have to code that on your own in OriginC (or LabTalk).

If you aren't able to figure that out on your own, let me know and I'll try to post some basic code here (haven't one yet..).

You'll probably have to deal with the OriginC object Project.Pages or Project.GraphPages and search for the property name (GetName) as an starting point.


So far
Hajo

-- --
Dipl.-Ing. Hans-Joerg Koch
SiemensVDO Automotive
Regensburg


Edited by - hajo on 07/24/2004 12:32:53 PM

Edited by - hajo on 07/24/2004 12:38:44 PM

Go to Top of Page

greg

USA
1379 Posts

Posted - 07/26/2004 :  1:58:10 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Open Project Explorer (Alt+1)
Right-click on the top-level folder
Select Find

The dialog can search based on text in Window Names, Window Labels and Folder Names.

Go to Top of Page

hajo_old

Germany
141 Posts

Posted - 07/26/2004 :  2:06:47 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, Greg

that's it I guess ...

I must have overread that in the docs!!
Thanks for the hint. That saved my a couple of grey hairs programming the same feature ...

Hajo

-- --
Dipl.-Ing. Hans-Joerg Koch
SiemensVDO Automotive
Regensburg


Edited by - hajo on 07/26/2004 2:07:31 PM
Go to Top of Page

Piasecki

Poland
Posts

Posted - 07/26/2004 :  2:57:53 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:

Hi, Greg

that's it I guess ...

I must have overread that in the docs!!
Thanks for the hint. That saved my a couple of grey hairs programming the same feature ...

Hajo

-- --
Dipl.-Ing. Hans-Joerg Koch
SiemensVDO Automotive
Regensburg
------------------

Edited by - hajo on 07/26/2004 2:07:31 PM



Hi,
According to Origin's help:
"Project Explorer's Find dialog box helps you locate child windows".
I want to find some Graph, is it treated as a "child windows"?
BTW, I cannot try it because
I don't know where exactly to put the marker (I have the project not organized into folders, all the graphs and worksheets are together) and right clicking doesn't produce anything like this.
Could you pls explain more detaily?
Thanks
Eryk
Go to Top of Page

greg

USA
1379 Posts

Posted - 07/26/2004 :  4:46:39 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
All Worksheet, Graph, Matrix, Layout and Excel windows are Child Windows whether they are in a folder or not. In any project, the top level folder is the project file name, so click on that folder in the left pane of the Project Explorer window.

Go to Top of Page

Piasecki

Poland
Posts

Posted - 07/26/2004 :  5:20:21 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Greg,
If this is so, then it is unable to find what I am looking for: whether I am looking for some graph according to the time stamp, or according to the text on the axis - it is unable to find it, even if this graph is just minimized, even not hidden.
Any idea?
Eryk
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 07/27/2004 :  06:58:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Eryk,

Time stamp and axis text are not choices in my Find dialog. (Origin 7.5) The Search in options that I see are Window Names, Window Labels and Folder Names. What version of Origin are you using?

Mike Buess
Origin WebRing Member
Go to Top of Page

Piasecki

Poland
Posts

Posted - 07/27/2004 :  09:12:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
That's the point!
My question was/is: how to find a graph knowing some string (time stamp, title, label on the axis etc). I think that what Greg proposed is not a solution.
Is there any better?
Eryk
PS. I have Origin 6.1

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 07/27/2004 :  10:19:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You'll have to write your own script for that and in Origin 6.1 it will have to use LabTalk. Time stamp will not be possible. To search for axis label text you might try something like this...

%L="search string";
getn (axis label text) %%L (Find...);
doc -e P {
%A=xb.text$;
if("%A"=="%L") win -a %H;
};

Open custom.ogs (Origin's program folder) in Notepad and copy/paste that script to the [Main] section. Save and try it out by clicking the Custom Routine button on the Standard toolbar. It will look at the bottom X axis label in the active layer of each graph in the project. If the text matches the search string then it will activate that graph window.

Hope that helps,

Mike Buess
Origin WebRing Member
Go to Top of Page

Piasecki

Poland
Posts

Posted - 07/27/2004 :  10:29:50 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks a lot, but...
1. Is it a sketch or I should copy it literally? (I have no idea about C nor LabTalk.
2. I think that the time stamp is most frequently used to identify the Graph. There is no way to search according to it?
Best regards
Eryk

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 07/27/2004 :  11:32:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
1. Just copy/paste the script to the [Main] section. Should end up looking like this (the script that was already there is commented out)...

[Main]
// type -b $General.Userbutton;
%L="search string";
getn (axis label text) %%L (Find...);
doc -e P {
%A=xb.text$;
if("%A"=="%L") win -a %H;
};

2. Origin doesn't keep track of window creation dates or times (at least that information cannot be accessed from LabTalk). However, the doc -e P command loops through all graph windows in the order they were created and applies the bracketed script to each. The script I've already given you activates a window based on its X axis label. Alternatively, you could activate the window based on creation order...

nn=1; // default to first window
getn (window number) nn (Find...);
mm=0;
doc -e P {
mm++; // increment mm
if(mm==nn) win -a %H;
}

If that's satisfactory I can show you how to combine the label text and creation order scripts.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 07/27/2004 11:35:36 AM
Go to Top of Page

Piasecki

Poland
Posts

Posted - 07/27/2004 :  12:07:34 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks a lot, Mike, but... perhaps I should start from explanation why I need the feature.
After one or 2 years of making figures I have a pile of them printed out. If I find between them something interesting which I would like to use or edit, I have to dig into thousands of Origin Figs. To make this task easier I should have each (printed)figure (easily) marked in a way that after some time I can rapidly find it in my project(s). I was thinking about the time stamp, but if it is difficult or impossible, perhaps there is some other easy (automatic?) way of labeling every figure in a way making possible finding the figure afterwards?
The axis labels are not very practical because they are usually similar or the same in many figures. Giving the separate label to every figure is difficult, besides the labels are (apparently) not printed. Nor the number of graph.
Perhaps you have any idea?
Thanks in advance
Eryk

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 07/27/2004 :  12:35:19 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I can't think of a way to identify the project from which an existing printout was made but you can avoid the problem in the future. Just download and install stamp.opk from OriginLab's File Exchange...

http://www.originlab.com/FileExchange/details.aspx?C=5&cid=5&fid=27

It installs a toolbar button that labels the graph with the path and name of the project. (That label does print with the graph.) Be sure to save the project first or you'll end up with a label that says UNTITLED. It's even easy to add the window name to the stamp label. Open Stamp.ogs in Notepad and change the one-line script to this...

label -s -sa -d (.1*page.width) (.05*page.height) -n pathstamp \v(%x%g - %H);

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 07/27/2004 12:52:42 PM
Go to Top of Page

Piasecki

Poland
Posts

Posted - 07/27/2004 :  12:58:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
This might be a solution for the future if not the fact that in a project I have usually about 100 figures, so how I can find between them THE figure???
Or perhaps I misunderstood you?
Eryk

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 07/27/2004 :  1:01:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I explained how to add the figure (window) name to the stamp label. Once you know that you can use Project Explorers Find feature to bring it up. Or simply enter this command in the script window...

win -a WindowName;

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 07/27/2004 1:20:19 PM
Go to Top of Page

Piasecki

Poland
Posts

Posted - 07/27/2004 :  1:19:53 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
OK, so this is equivalent to giving (by hand)different name for each figure (window), but this name will be printed and afterwards can be found via the FIND dialog, right?
Eryk

Go to Top of Page

Piasecki

Poland
Posts

Posted - 07/27/2004 :  1:59:46 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
In fact I might copy the time stamp into the window name, right?
E.

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 07/27/2004 :  2:40:54 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can put the time into the stamp label, if that's what you mean...

label -s -sa -d (.1*page.width) (.05*page.height) -n pathstamp \v(%x%g - %H - $(@D,D10));
pathstamp.fsize=16;

The last statement reduces the font size to 16 pts because your stamp label might be getting pretty long by now. :)

...The date/time in the label will be the date/time that you created the label (clicked the stamp button) and not the time you created the graph. Practically the same thing for cataloging purposes.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 07/27/2004 3:22:52 PM
Go to Top of Page

Piasecki

Poland
Posts

Posted - 07/29/2004 :  3:18:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
OK, Mike, finally I have some time to check your idea.
You wrote:
>Just download and install stamp.opk from OriginLab's File Exchange...

WHERE to download and HOW to install? There is nothing like this in the help...
Eryk


Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 07/29/2004 :  4:11:05 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Eryk,

Just follow the link I gave above. Here it is again...

http://www.originlab.com/FileExchange/details.aspx?C=5&cid=5&fid=27

Mike Buess
Origin WebRing Member
Go to Top of Page

easwar

USA
1965 Posts

Posted - 07/29/2004 :  4:12:16 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:

WHERE to download and HOW to install? There is nothing like this in the help...
Eryk



Hi Eryk,

File Exchange is an area of our website where users can upload and share tools/applications with others:
http://www.originlab.com/FileExchange/
OriginLab often places things there to share with users as well.

The specific item Mike referred to is under the Graphing category:
http://www.originlab.com/FileExchange/details.aspx?C=5&cid=5&fid=27

Easwar
OriginLab

Edited by - easwar on 07/29/2004 4:12:51 PM
Go to Top of Page

Piasecki

Poland
Posts

Posted - 07/29/2004 :  4:24:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you, but my question was not where from to download but rather where to put the file, into what directory.
And HOW to compile it (I don't know the LabTalk!)?

Cheers
Eryk

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 07/29/2004 :  4:44:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Download stamp.opk to any location on your hard drive. Start Origin and when its ready find stamp.opk in Windows Explorer and run it by double-clicking on its icon or dragging it to Origin's program window. That will automatically install the Stamp toolbar.

...Many of the add-ons on the File Exchange are installed by OPK. Most give instructions for installing but some do not (e.g., Stamp). Suggestion to OriginLab: Since OPK is an OriginLab technology perhaps general instructions for OPK installation should be included somewhere on the File Exchange.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 07/29/2004 5:04:27 PM
Go to Top of Page

easwar

USA
1965 Posts

Posted - 07/29/2004 :  5:16:52 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:

Suggestion to OriginLab: Since OPK is an OriginLab technology perhaps general instructions for OPK installation should be included somewhere on the File Exchange.



Hi Mike,

That is a good suggestion - we will see how to add such general info to File Exchange.

Eryk, my apologies - I did not realize that this OPK had not instructions on installation.

Easwar
OriginLab

Go to Top of Page

Piasecki

Poland
Posts

Posted - 07/29/2004 :  5:27:33 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
OK, it works in a sense that it adds a string (with a path and time stamp) to the graph. But does it mean that it "labels" the graph? In any case the FIND comand is not able to find the graph...

Eryk

Go to Top of Page

Piasecki

Poland
Posts

Posted - 07/30/2004 :  05:51:40 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
In fact I can "force" labeling the graph by time stamp: I have to rename the graph pasting the time stamp string (and - if I wish - some additional info) into the label window. Then the stamp will be searchable.
This is what you have in mind?
But for this, I think, all the play with the script is not necessary: I can just press the standard time stamp button, copy (by hand) the time string and paste it as the label during the rename operation.
This is faisable, even if a bit cumbersome.
But perhaps you have in mind some more automatic procedure?
Cheers
Eryk


Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 07/30/2004 :  09:21:43 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It would seem that to locate a graph window from its physical printout all you need to know is the name of the graph window and the path\name of the project it's in. The new stamp button (with suggested modifications) will add text labels with both pieces of information to future graphs and their printouts. Open the project named on the printout and use Project Explorer's Find command to search for the window name.

It finally dawned on me that the 'time stamp' you've been referring to is not an internal property but a text label like the file name stamp. (I never use the Time Stamp button and forgot that it existed.) If you've been labelling your printouts with the time stamp then you can search for the graph window containing a particular date/time string.

1. Open custom.ogs in Notepad.

2 . All lines starting with // are comments. Ignoring comments and empty lines, make the file look like this...

[Main]
getstring (Enter date/time search string...) "1/1/2000 00:00:00" (Find);
if(%B=="") return;
%W="";
doc -e P {
if(timestamp.show!=0/0) {
%T=timestamp.text$;
if("%T"=="%B") %W=%H;
};
};
if(%W!="") win -a %W;

3. Save and close Notepad.

4. Click the Custom Routine button and enter the date/time string appearing on a printout. That will bring up the window containing that time stamp if that window exists in the project.


Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 07/30/2004 09:40:39 AM
Go to Top of Page

Piasecki

Poland
Posts

Posted - 07/30/2004 :  10:22:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
GREAT, that's it!
This is what I looked for.
Just one additional request: could you pls eliminate the date from the custom.ogs? This is quite redundant and slows down the procedure(time is quite sufficient).

Thanking in advance
Eryk

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 07/30/2004 :  11:43:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
This should work. Now the if condition is on the second token (time) of the date/time string. That will not speed up the search but the additional break statement might. It exits the doc loop when the search string is found.

[Main]
getstring (Enter time search string...) "00:00:00" (Find);
if(%B=="") return;
%W="";
doc -e P {
if(timestamp.show!=0/0) {
%T=timestamp.text$;
if("%[%T,#2]"=="%B") {%W=%H; break};
};
};
if(%W!="") win -a %W;

Mike Buess
Origin WebRing Member
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic   Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000