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
 Remove data plot?

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
Mike Buess Posted - 11/17/2003 : 5:24:37 PM
How does one remove a dataplot from a layer in Origin C?

Mike Buess
Origin WebRing Member
4   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 11/17/2003 : 11:34:15 PM
LT_execute gets back into LT and the general problem of Active window and Active Layer. so OC provide page and layer level LT_execute so that the LT string passed into those versions of LT_execute can assume that object as the Active window or Acitve layer. This is very much like the LT version of win -o {script} or layer -o {script}.

It is easy to forget all these little problems and hidden assumptions in the LT world once you are more comfortable with OC, where everything is clear by simply looking at the C/C++ code.

CP


Mike Buess Posted - 11/17/2003 : 8:19:28 PM
Thanks, Ruthven. That's essentially what I ended up doing.

BTW, you use glayer.LT_execute() in your example. That works fine, but so does just LT_execute(). Are there any guidelines for using one or the other?

Mike Buess
Origin WebRing Member
rlewis Posted - 11/17/2003 : 7:12:33 PM
Until 7.5-SR1 comes along you may wish to try this workaround which CP posted some time ago ..

bool remove_data_plot(GraphLayer glayer, DataPlot dp)
{
string strName = dp.GetDatasetName();
DataPlot dp1 = glayer.DataPlots(strName);
if(NULL == dp1)
return false; // given data plot does not belong this specified layer
string strTemp;
strTemp.Format("layer -e %s", strName);

glayer.LT_execute(strTemp);
return true;
}
cpyang Posted - 11/17/2003 : 6:00:29 PM
I am afraid that was missing in 7.5 release and has been added to SR1 (5325).

CP




Edited by - cpyang on 11/17/2003 6:01:06 PM

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