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 for Programming
 LabTalk Forum
 Worksheet significant digits with wproperties
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

scalpas

9 Posts

Posted - 02/22/2016 :  3:37:07 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi

I'd like to set the number of significant digits in a worksheet programmatically using LabTalk.

So far I've managed to set the mode to significant digits using :

wproperties execute:=get iotrgui:=tr;
tr.TextControl.DigitsMode = 2;
wproperties execute:=set iotrgui:=tr;


Now, how do I actually set the number of significant digits ?

Thanks !


Origin Ver. 9.0 and Service Release 1 :
Operating System: 7 64 bit

Hideo Fujii

USA
1582 Posts

Posted - 02/22/2016 :  5:24:14 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi scalpas,

The aim of worksheet properties is ad hoc changes of cell formats like for cell colors, etc.,
corresponds to the options in the Format Cells dialog:
http://www.originlab.com/doc/Origin-Help/FormatCells-Dialog

Instead, I suggest to set the properties of the worksheet column object (wks.col#):
http://www.originlab.com/doc/LabTalk/ref/Wks-Col-obj

E.g.,:
for(ii=1; ii<=wks.ncols; ii++) {
 wks.col$(ii).digitMode=2; //Sig Digits
 wks.col$(ii).digits=10;   //# of digits
}
Hope this helps.

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 02/23/2016 1:33:12 PM
Go to Top of Page

scalpas

9 Posts

Posted - 02/23/2016 :  3:15:12 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Hideo, that works very well !
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000