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
 get embedded graph

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
couturier Posted - 01/28/2020 : 4:18:43 PM
Origin Ver. and Service Release (Select Help-->About Origin):2020
Operating System:win10

I have a graph embedded into a cell, and I want to access this graph to add a plot
Right now, I'm doing something like this:

Worksheet wks = Project.ActiveLayer();
string strCell;
wks.GetCell(nrow, ncol, strCell);
strCell = strCell.GetToken(1,':'); // graph name
GraphLayer gl(strCell, nlay);

But sometimes, I get an invalid GraphLayer
In code builder, strCell will return Graph3 while embedded graph is Graph17 and I can't understand what's going wrong

Is there any better method for accessing an embedded graph ?
3   L A T E S T    R E P L I E S    (Newest First)
couturier Posted - 01/30/2020 : 06:00:37 AM
It works great !
Thanx
Castiel Posted - 01/29/2020 : 8:57:50 PM
quote:
Originally posted by couturier

I think it's a matter of refresh
when I load the template, only 2 embedded graphs are visibles and code is OK with them
Then I have 5 other graphs than are not visible unless you scroll down, and issue occurs for them
If I scroll down before running the code, everything is OK.

So I'm wondering how to refresh the whole wks

Tried win.SetRedraw(TRUE) + win.UpdateWindow() but it doesn't work




Does Worksheet::GetEmbeddingParams() work?

https://www.originlab.com/doc/OriginC/ref/Worksheet-GetEmbeddingParams


                                          &&&&&&&&&
                                        &&&
                                       &&
                                      &  _____ ___________
                                     II__|[] | |   I I   |
                                    |        |_|_  I I  _|
                                   < OO----OOO   OO---OO
**********************************************************
couturier Posted - 01/29/2020 : 07:43:43 AM
I think it's a matter of refresh
when I load the template, only 2 embedded graphs are visibles and code is OK with them
Then I have 5 other graphs than are not visible unless you scroll down, and issue occurs for them
If I scroll down before running the code, everything is OK.

So I'm wondering how to refresh the whole wks

Tried win.SetRedraw(TRUE) + win.UpdateWindow() but it doesn't work

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