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
 Getting col labels

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
couturier Posted - 02/20/2015 : 5:52:39 PM
Origin Ver. and Service Release (Select Help-->About Origin): 2015 Sr1
Operating System: win7

Hi,
it is possible to set which col labels are shown with wks.labels() method.

Is it possible to read which col labels are shown ?
1   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 02/20/2015 : 9:38:09 PM
I am afraid there is not a general access to get do the getting similar to wks.labels command in LabTalk. For user parameter rows, you can use wks.userparam1 etc to control, see this new blog post:

http://blog.originlab.com/2015/show-columns-mean-and-size-in-column-label-rows#more-727

The following OriginC code will provide this function, and you can add this to your OriginC codes and put into Code Builder User (AutoLoad)


//usage: v1 = IsWksLabelShown("C");
// return 1 if Shown, 0 if not, <0 if error
int IsWksLabelShown(string strLabelChar)
{
	Worksheet wks = Project.ActiveLayer();
	if ( !wks )
		return -1;
	vector<int>		vnTypes;
	if ( !okutil_convert_labels_string_to_indices(strLabelChar, &vnTypes) )
		return -2;
	// must input only one label type
	if(vnTypes.GetSize() != 1)
		return -3;
	return wks.IsLabelTypeShown(vnTypes[0]) ? 1:0;
}



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