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
 Forum for Origin C
 How to get the GraphPages title?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

rainlane

China
22 Posts

Posted - 03/15/2017 :  11:37:10 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): Origin 9.0
Operating System:Windows XP
I made a graph which title is Chinese "图1.1 函数y=x 总图1".

I use the code to print the title.

	GraphPage gp = Project.GraphPages(-1);
	GraphLayer gl = gp.Layers(gp.Layers.Count() -1);
 
	Tree tr;
	tr = gl.GetFormat(FPB_ALL, FOB_ALL, true, true);
	out_str(tr.Root.Axes.X.Titles.BottomTitle.Text);

The result is "0.0.1102216.19999999999999910.616.19999999999999910.1999999999999990-400.0-4100.?1.1 ??y=x
??1010000000110";

How to print the correct tile of the graph using Chinese.

forum

yuki_wu

896 Posts

Posted - 03/16/2017 :  02:56:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Make sure you are using Chinese version (Origin 2017 SR1 beta or its upcoming release) if you want to show Chinese normally in Origin instead of displaying as “?”.

BTW, Origin 9.0 that you are using does not support Chinese.

In fact, tr.Root.Axes.X.Titles.BottomTitle.Text will only get the tree node. If you want to get the value of this tree node, you’d better change your code as follows:

TreeNode trText = tr.Root.Axes.X.Titles.BottomTitle.GetNode("Text");
out_str(trText.strVal);

Hope this can be some help.

Regards,
Yuki
OriginLab
Go to Top of Page

rainlane

China
22 Posts

Posted - 03/16/2017 :  11:33:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for your answer!
I used your code on the Origin 9.0 to get the title.
The result is also "?" where the text is Chinese.
I would like to use the Chinese version in the future.


quote:
Originally posted by yuki_wu

Hi,

Make sure you are using Chinese version (Origin 2017 SR1 beta or its upcoming release) if you want to show Chinese normally in Origin instead of displaying as “?”.

BTW, Origin 9.0 that you are using does not support Chinese.

In fact, tr.Root.Axes.X.Titles.BottomTitle.Text will only get the tree node. If you want to get the value of this tree node, you’d better change your code as follows:

TreeNode trText = tr.Root.Axes.X.Titles.BottomTitle.GetNode("Text");
out_str(trText.strVal);

Hope this can be some help.

Regards,
Yuki
OriginLab




forum
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