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

SteveS2

USA
Posts

Posted - 07/28/2006 :  2:42:56 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin 7.5 SP5:
Windows 2000


Is there a way in code to turn off the legend Auto update property?


Deanna

China
Posts

Posted - 07/30/2006 :  11:21:50 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If you are talking about turning off the legend auto update property for a graph page, there will be a way to do that.

The following function is an example. It reads the formats of a graph page, turns off the auto-update for legend, and updates the change of formats for the graph page.


void test4996()
{
//Get the first graph page in the project
GraphPage pg = Project.GraphPages(0);
if (!pg) return;

//Get part of its format
Tree tr;
tr = pg.GetFormat(FPB_OTHER, FOB_LABELS);

//Get the tree node for legend auto-update
TreeNode tn;
tn=tree_get_node_by_attributes(tr, "NodeID", "639");
if (!tn.IsValid()) return;

//Set legend auto-uplate to be false
tn.nVal=0;

//Apply the changed format
pg.ApplyFormat(tr);
}


Hope it helps. :)

Deanna
OriginLab GZ Office
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