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
 Origin Forum
 bubble legend

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
maarnts Posted - 05/01/2018 : 10:45:45 AM
Origin Ver.2018 and Service Release 1 Operating System:W7

Is there a method to access the variables/options used in the bubble-legend via labtalk?

I'm able to add the legend via the command
run.section(Standard,Bubble);
to a graph, but I cannot change, for instance, the min and max values of the bubble chart via a labtalk command.

2   L A T E S T    R E P L I E S    (Newest First)
maarnts Posted - 05/06/2018 : 3:52:16 PM
Shirley
thanks for your answer.

With the script below I'm now able to control the bubble legend with labtalk.

However the lines
trFmt.Root.Page.AllLayers.AllBubbles.DimAxis2.AllNewAxis.Title.Show = true; //show title
trFmt.Root.Layout.Symbol.Style = 1; // no fill black line

give compile errors. (without them everything works fine)

I could not find any suggestions in the C help files how to deal with this. Can you please tell me what I am doing wrong?





bool bubble_legend_modification()
{
double bubble1;
double bubble2;
LT_get_var("bubble1" , &bubble1);
LT_get_var("bubble2" , &bubble2);

GraphLayer layActive = Project.ActiveLayer();
GraphObject go = layActive.GraphObjects("BUBBLELEGEND1");
if(!go)
return false;

Tree trFmt;
trFmt.Root.DimAxes.DimAxis2.Scale.From.dVal = bubble1;
trFmt.Root.DimAxes.DimAxis2.Scale.To.dVal = bubble2;
trFmt.IncrementBy.nVal = 4;//OAXISINCREMENT

trFmt.Root.Page.AllLayers.AllBubbles.DimAxis2.AllNewAxis.Title.Show = true; //show title
trFmt.Root.Layout.Symbol.Style = 1; // no fill black line

int nErr = go.UpdateThemeIDs(trFmt.Root);
if(nErr == 0)
{
int nRet = go.ApplyFormat(trFmt, true, true);
}
return true;
}


Shirley_GZ Posted - 05/02/2018 : 05:45:34 AM
Hi Maarnts,

Sorry, we don't have LabTalk commands to customize the bubble scale format. But you can use Origin C script instead, such as


bool test_buuble_format()
{
	GraphLayer layActive = Project.ActiveLayer();
	GraphObject go = layActive.GraphObjects("BUBBLELEGEND1");
	if(!go)
		return false;
		
	Tree trFmt;
	trFmt.Root.DimAxes.DimAxis2.Scale.From.dVal = 0;
	trFmt.Root.DimAxes.DimAxis2.Scale.To.dVal = 15;
	trFmt.Root.DimAxes.DimAxis2.Scale.IncrementBy.nVal = OAI_MAJORTICKCOUNT;//OAXISINCREMENT
	int nErr = go.UpdateThemeIDs(trFmt.Root);
	if(nErr == 0)
	{
		int nRet = go.ApplyFormat(trFmt, true, true);
	}
	return true;
}


This example can be used to change the From and To value at the Levels tab of Bubble Scale Control dialog,
https://www.originlab.com/doc/Origin-Help/BubbleScale#Levels

If you want to change other properties with Origin C treenode as above, please check the variable names in the Apply Format dialog as below:


The details of Apply Formats dialog can be found here,
https://www.originlab.com/doc/Origin-Help/CopyPaste-Format

Thanks,
Shirley

Originlab Technical Service Team

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