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
 Forum for Automation Server/COM and LabVIEW
 Change Units/Matlab/Long Name from MATLAB

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
eb7dzp Posted - 02/21/2013 : 5:37:13 PM
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System: Windows7

Dear all,

I am using MATLAB to send data to Origin with PutWorksheet as mencioned in CreatePlotInOrigin.m example.


%invoke(originObj, 'PutWorksheet', '[DatosExp]Sheet4',OutputVoltageAverage',0,8);

But now I need to change the Units/long name/comments of each column.

%>>col(2)[L]$=my full name;
%>>col(2)[U]$=Ohms
%>>col(2)[C]$=my H

Does somebody knows the commands in Matlab I must use to do so ? Is it possible using Origin COM Server object ?


Thanks in advance.

4   L A T E S T    R E P L I E S    (Newest First)
fifacoins11 Posted - 10/04/2015 : 01:48:25 AM
FIFA 16 is an association football simulation video game published by EA Sports for Microsoft Windows, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, Android and iOS. The game is the first in the FIFA series to include female players at fifa16.vipmmobank.com
Penn Posted - 02/24/2013 : 10:29:21 PM
Hi,

Maybe the worksheet you put data is not the active one in Origin. If you still execute LabTalk script, you need to activate this worksheet first, or you can use the range variable, such as

originObj.invoke('Execute', 'range r1 = [DatosExp]Sheet4!col(2);');  % define a range to column 2 in the worksheet
originObj.invoke('Execute', 'r1[L]$=my full name;');  % set long name
originObj.invoke('Execute', 'r1[U]$=Ohms;');  % set units
originObj.invoke('Execute', 'r1[C]$=my H;');  % set comments

And the other way not to use LabTalk will be like this.

wks = originObj.invoke('FindWorksheet', '[DatosExp]Sheet4');  % find worksheet
cols = wks.invoke('Columns');  % column collection in worksheet
col = cols.invoke('Item', uint32(1));  % the second column
col.invoke('LongName', 'my full name');  % set long name
col.invoke('Units', 'Ohms');  % set units
col.invoke('Comments', 'my H');  % set comments


Penn
cp3company Posted - 02/23/2013 : 7:47:59 PM
Hello everyone,

I've tried to use those commands aiming to edit the Long name and Units field of each column but it places the names and units in a different sheet from where i am working in.

I would like to write the unit and name right after filling my data column, for example:

%I first fill the column with my data
invoke(originObj, 'PutWorksheet', '[DatosExp]Sheet4',OutputVoltageAverage',0,8);
%The try to change the name and unit
originObj.invoke('Execute', 'col(2)[L]$=Output Voltage;');
originObj.invoke('Execute', 'col(2)[U]$=(V);');

But then the name and units appear in other different sheet from the one in which de OutputVoltageAverage data got stored

Any help with that? Thank you in advance!

quote:
Originally posted by Penn

Hi,

The simple method is to execute the LabTalk script directly. For example:

originObj.invoke('Execute', 'col(2)[L]$=my full name;');
originObj.invoke('Execute', 'col(2)[U]$=Ohms;');
originObj.invoke('Execute', 'col(2)[C]$=my H;');


Penn

Penn Posted - 02/22/2013 : 05:08:29 AM
Hi,

The simple method is to execute the LabTalk script directly. For example:

originObj.invoke('Execute', 'col(2)[L]$=my full name;');
originObj.invoke('Execute', 'col(2)[U]$=Ohms;');
originObj.invoke('Execute', 'col(2)[C]$=my H;');


Penn

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