Author |
Topic |
|
eb7dzp
Sri Lanka
1 Posts |
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.
|
|
Penn
China
644 Posts |
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 |
|
|
cp3company
1 Posts |
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
China
644 Posts |
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 |
|
|
fifacoins11
Algeria
4 Posts |
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 |
|
|
|
Topic |
|
|
|