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
 copy wks to matrix: update old script to O-Pro 8.1

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
linele Posted - 10/05/2010 : 10:07:06 AM
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System: OriginPro 8.1G

Hello there,
might be a simple trick, but how can I update this old script to the new Version of 8.1 using Longname/Shortname of the wks as new Longname/Shortname of the matrix.

mat.wksname$ = %H;
win -T M;
mat.matname$ = %H;
mat.w2m();

Thank you!
4   L A T E S T    R E P L I E S    (Newest First)
linele Posted - 10/12/2010 : 07:13:49 AM
THANK YOU, that is exactly what I have been looking for.
Regards from Germany.
cpyang Posted - 10/07/2010 : 10:14:59 AM
You can not make the resutling matrix having the same shortname as the source worksheet, unless you can delete the source worksheet after the copying. The following code will prefix the result with M:

%A=%H;
%B=page.longname$;
w2m;
page.longname$=%B;
win -r %H M%A;


While the following code will del the source and name the new matrix accordingly


%A=%H;
%B=page.longname$;
w2m;win -cd %A;
page.longname$=%B;
win -r %H %A;


CP
linele Posted - 10/06/2010 : 01:54:30 AM
Hello CP,

and if I want to have the worksheet's short- and longname as new names for the matrix? As I have to convert a bunch of wks to matrices, so this is why I want to do it via labtalk.

Thanks again!
cpyang Posted - 10/05/2010 : 6:48:35 PM
This script does not care about names, it simply copy the active worksheet to a new matrix.

If that is all you need to do, then just use the new w2m X-Function:


w2m



You can read more about this XF online or from the script window


w2m -h;

CP

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