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
 edge / fill color symbol

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
papangue Posted - 01/11/2005 : 12:00:40 PM
Origin Version (Select Help-->About Origin): 7.5
Operating System:Win2k

Hello,
I wanted to linked the edge/fill color the corresponding RGB data stored in a worksheet, like this:
Plot Detail Dialogue Box -> Symbol Tab
edge/Fill Color = Direct RGB -> choose corresponding column
But i want to make it in OriginC (and or LabTalk)

Has anyone an idea?

Thanks
2   L A T E S T    R E P L I E S    (Newest First)
papangue Posted - 01/12/2005 : 03:44:45 AM
thanks a lot for the method and the explanations
easwar Posted - 01/11/2005 : 2:08:29 PM
Hi,

The following is an Origin C solution.

First of all, to know what properties are available and what to set, you can first copy the theme/collection of properties of an object to a tree and dump the tree to script window, using code such as below:


void dump_format()
{
GraphLayer gly = Project.ActiveLayer();
DataPlot dp = gly.DataPlots(0);
if( !dp ) return;

Tree trFormat;
trFormat = dp.Curve.Symbol;
out_tree(trFormat);
}



If you run the above with a data plot in the active layer where the symbol color is set to use RGB based on values in the column right next to the Y column, you will see an output like below:

Symbol
Font
Face = 0
Bold = 0
Italic = 0
Underline = 0
Size = 12.
Scale = 1.
Type = 0
Shape = 2
Interior = 0
Character = 0
User = 0
EdgeWidth = 255.
EdgeColor = 8388709
FillColor = 0
Outline = 0

So from the above output you see that the property of interest to you is "EdgeColor = 8388709".

Then in order to change this, you can write code such as:

void change_format()
{
GraphLayer gly = Project.ActiveLayer();
DataPlot dp = gly.DataPlots(0);
if( !dp ) return;

// Set the color to be RGB with RGB values from 2nd column
// to the right of the Y column that is plotted.
// So value to be set = 8388708 + offset for RGB column
dp.Curve.Symbol.EdgeColor.nVal = 8388710;
}



If you change the color type from RGB to Indexing etc, the offset number (8388708 in the above case of RGB) will be different. And for fixed colors such as the default black, red, green etc the number will be 0, 1, 2 etc for example.

Easwar
OriginLab


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