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 red data selection circles

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
michaelbraun Posted - 07/15/2015 : 11:22:03 AM
Origin Ver. and Service Release (Select Help-->About Origin): Origin 2015 sr2
Operating System:Windows

I used GetGraphPoints to select a number of points, however the red circles that show each selection point remain after my code has finished. They do not appear while printing, but I would like to not have them showing at all when the code finishes. Here is the relevant section of code:


class MyGetGraphPoints : public GetGraphPoints
		{
			virtual void OnStart()
			{
				out_str("Pick points");
			}
			virtual void OnFinish()
			{
				out_str("Done");
			}
			virtual void OnNewPoint(int nPoint)
			{
				out_int("You have sucessfully selected point ",nPoint+1);
			}
			virtual void OnDisplay(string& str, int nPoint)
			{
				if( nPoint >=0 && !str.IsEmpty() )
				{
					str += "\nHello"; // Hello display on the second line in Data Display bar
				}
			}
			virtual void OnCancel()
			{
				out_str("You cancelled the operation");
			}
		};

void Test_code()
{
                        GraphPage gp;
			gp.Create("Line"); // create a graph using the Line template
			GraphLayer gl = Project.ActiveLayer();
                        //Plots the line
			Curve crv(wks, 0, 1);
			int nPlot = gl.AddPlot(crv, IDM_PLOT_LINE);
                        DataPlot dp = gl.DataPlots(nPlot);
			int nNumPoints = 100; //arbitrary high number so that user can pick exact number of points on graph, then hit esc to continue
			MyGetGraphPoints sp;
			sp.SetFollowData(true, nPlot);	
			sp.GetPoints(nNumPoints, gl);
		 
			vector xData, yData;
			vector<int> vnIndices;
			sp.GetData(xData, yData, vnIndices);
		 
			out_str("You have selected the following points:");
			for(int ii = 0; ii < xData.GetSize(); ii++)
			{
				printf("Point %d: X=%f, Y=%f\n", ii+1, xData[ii], yData[ii]);
			}	

}

I have tried adding lines such as gl.Update; gl.Refresh; but can not get the red selection circles to disappear.
2   L A T E S T    R E P L I E S    (Newest First)
michaelbraun Posted - 07/15/2015 : 2:03:16 PM
Ahhh, yes I missed that thank you, it worked.
cdrozdowski111 Posted - 07/15/2015 : 12:58:03 PM
Michael,

Try adding the following two lines to the very end of your Test_code() function:

gp.Refresh();
out_str("GraphPage Obj Refreshed"); // Debug


you wan to refresh your entire page not layer.

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