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
 Origin Forum
 "dynamik" reference & file name reference

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
Cracker Posted - 10/09/2022 : 12:40:38 PM
Origin Ver. and Service Release: OriginPro 2021 (64-bit), 9.8.0.200
Operating System: Windows 10 Home, 64-Bit-Betriebssystem

Dear forum members,
this question bugged me for a long time, but I never knew how to express my problem. I hope the following (and rather lengthy) explanation can provide enough input.

The following example shows how I usually use Origin:
After creating a project file I create some sup files to organize the rawdata, the calculation, the results and remarks.

The data I need to analyze consists of a series of test with changing parameters. So, I create a sup file and a template by analyzing the first test.
I save this template as a new project, add it again and change the file name (xx -> Test_02) and overwrite the raw data. The goal is to "automatically" create all the necessary graphs and calculations.

Now my problem:

1) Inserting Links: For example the references "var: //[L_Z1] 1! VLINE2.X" does not work anymore as intended, because the names of the added sheets get an "A" at the end. Would I add the template again all the sheets get a "B" and so on.
-> Is there a solution to this problem?

2) Is it possible to reference a file name? Example: If I change the file name (xx- Test_02) the title of the graph should also change.



Cheers
Cracker
4   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 10/10/2022 : 2:20:43 PM
Actually the col(A)[C] namely Comment cell does not hold the graph name, but "str://%@T" and %@T is a string register that points to the graph's name in the sheet. You can double-click to see and change it. It will not work if your graph has a long name. See

https://www.originlab.com/doc/LabTalk/guide/String-registers#:~:text=String%20registers%20hold%20up%20to,are%20also%20known%20as%20%25%20variables.

We can make a change to use graph long name, and to find in current folder first. Currently if the name is quoted, it will be interpreted as searching by long name, which does not change upon appending, but it will not favor current folder.

I added ORG-25804 for this and should be in the upcoming Origin 2023.

CP
snowli Posted - 10/10/2022 : 11:02:49 AM
Hi Cracker,

Col(A)[C] refers to column A's comments label row.

When you add graph as a sheet in workbook, we actually put the graph in a worksheet with only 1 column and one row so it's column A. [1] row.
The graph window name on the top, which is actually the comments row of the column.


If u right click the whole window title. E.g. Book1 and
choose View: Column header context menu to turn on column header.
Also choose View: Row header context menu to turn on Row header.

U will be able to see the column and row info. e.g. A(X) and Comments, 1

We hide it for such graph sheet so it's nicer looking.

Since Col(A)[c] is filled with graph window, if u use it in code, it will always refer to correct graph window.


Thanks, Snow
Cracker Posted - 10/10/2022 : 04:37:39 AM
Thanks for this neat work around!

I am fairly new to Origin and I do not have any programming background, so sometimes it is difficult to really understand the given solutions.

Regarding "var://[%(2!col(A)[C]$)]1!vline.x1" for example
1) var://[%( )]
-> I think I get this https://www.originlab.com/doc/en/LabTalk/guide/Substitution-Notation#.25.28_.29_Substitution

2)(2!col(A)[C]$)
-> this is confusing to me. "2!" references the second sheet in the given window (so where the graph is). But what is "col(A)[C]", or to be more specific, what does it reference? I only see the graph and no columns or rows ;)


Based on your answer it seems there is no direct solution. Origin does automatically change the windows names (Windows1 -> Window1A), but does not do so with the references inside the added project file.

"avoid windows name in the reference" is the goal (solution) here.
Echo_Chu Posted - 10/10/2022 : 02:49:42 AM
Hi, Cracker

You can try embedded your graph in the "Results" Worksheet as the second sheet. Then you can write the reference as "var://[%(2!col(A)[C]$)]1!vline.x1" to avoid windows name in the reference.



Echo
OriginLab Technical Service

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