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
 Getting col labels
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

couturier

France
291 Posts

Posted - 02/20/2015 :  5:52:39 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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 ?

cpyang

USA
1406 Posts

Posted - 02/20/2015 :  9:38:09 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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;
}


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