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
 Forum for Origin C
 How to get the GraphPages title?

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
rainlane Posted - 03/15/2017 : 11:37:10 PM
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
2   L A T E S T    R E P L I E S    (Newest First)
rainlane Posted - 03/16/2017 : 11:33:11 PM
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
yuki_wu Posted - 03/16/2017 : 02:56:33 AM
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

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