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
 Vector XYAM clip data to frame

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
starman2049 Posted - 02/24/2010 : 3:58:42 PM
I am using a Vector/XYAM plot and I want to clip data to frame via program control but don't see how to do that.

I can crate the chart then click on plot details/Display/Data Drawing Options/Clip Data To Frame, but I want to do this via program control not template it.

Any ideas?

Origin Ver. and Service Release (Select Help-->About Origin): 8.1
Operating System: XP
5   L A T E S T    R E P L I E S    (Newest First)
arsk Posted - 01/22/2011 : 05:34:38 AM
Hey hi to everyone. It has been long time that there has been any activity over here. Anyway I just want to say my gratitude to those who have posted some wonderful answers over here. You have just saved me. Thanks a lot. I will come here again if I get any doubts.

Hello
Deanna Posted - 03/02/2010 : 01:57:30 AM
Hi,

We will improve the Theme Tree so that it will include all properties in all graph types. A tracker has been submitted: tr# 15154. Thank you for bringing this up!

Deanna
OriginLab Technical Services
starman2049 Posted - 02/25/2010 : 4:38:34 PM
Thanks - worked like a charm!!
easwar Posted - 02/25/2010 : 2:35:13 PM
Hi,

The theme tree does not have this property included in it, so cannot currently use GetFormat and SetFormat

But there is LabTalk script access:

layer -b c 1; // turn on clipping
layer -b c 0; // turn off clipping


So from OC, you can use code such as:

	GraphLayer gly = Project.ActiveLayer();
	gly.LT_execute("layer -b c 1;");


Easwar
OriginLab
TreeNode Posted - 02/24/2010 : 7:48:23 PM
Hi starman,

I imagine that this could be done with the methods GetFormat() and SetFormat(),
like in this examples:

http://ocwiki.originlab.com/index.php?title=OriginC:OriginObject-GetFormat

but I didnt find the right property in the Format-Tree... ;-/
I created two Vector Graphs (XYAM). In one of them I activated the property: Clip Data To Frame
Then I stored each Format-Tree in xml-file:


void view_layer_properties_ex1()
{
	Page pg;
	GraphLayer gl;
	Tree tr;
	string strFileName;
	
	foreach (PageBase pb in Project.Pages)
	{
		pg = pb;
		if(!pg)
			continue;
		gl = pg.Layers();
		if(!gl)
			continue;
		strFileName.Format("C:\\XML\\%s.xml", pg.GetName() );
		tr = gl.GetFormat(FPB_ALL, FOB_ALL, true, true);
		tr.Save(strFileName);
	}	
}


I wrote a short C++ program to compare the two xml-files. But it found no difference.
But when I switch "show labels" on/off (checkbox) in one of the GraphPages,
which stands on the same tab ( plotdetails-->Display ), my program finds the difference in the Format-Tree.
So my program works, but couldnt find the property that you want to set via program control... sorry ;-/

I hope someone else knows where to find this property??


|-- TreeNode
...|-- a??
...|-- ha!!

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