Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
if( nEventID == GETNE_ON_CUSTOM_BUTTON1 )
{
    Menu m;
    m.Create();
    m.Add("Item 1",1,MF_DISABLED);
    POINT pt;
    GetCursorPos(&pt);
    m.TrackPopupResMenu(0, pt.x, pt.y, GetWindow());
}

The result will be

 

10. Add more Page and Layer classes LabTalk evaluation functions (ORG-8470)

Code Block
BOOL LT_evaluate(LPCSTR lpcszLabTalkExpression, double * lpdbResult);
BOOL LT_get_var(LPCSTR lpcszLabTalkVarName, double * lpdbResult);
BOOL LT_set_var(LPCSTR lpcszLabTalkVarName, double dbValue);
BOOL LT_get_str(LPCSTR lpcszLabTalkString, char* pBuffer, int nBufferSize);
BOOL LT_set_str(LPCSTR lpcszVar, LPCSTR lpcszContent);

 

11. Improve TreeNode display in Code Builder Variable window (ORG-8689)

Run

Code Block
void test_treenode()
{
	Tree tr;
	tr.a.nVal = 10;
	tr.b.strVal = "Fol";
	
	vector<int> vn = {1,2};
	tr.c.nVals = vn;
	vector<string> vs = {"a","b"};
	tr.d.strVals = vs;
	
	tr.e.a.strVals = vs;
	
	TreeNode trA = tr.a;	
	TreeNode trB = tr.b;	
	TreeNode trC = tr.c;
	TreeNode trD = tr.d;
	TreeNode trE = tr.e;
}

And get:

Image Added

 

12. Improve speed of OC compiler (ORG-8697)

 

13. Error message of X-Function shows in

...

window (Script Window) where it runs (ORG-8836)

Template support for plotting X-Functions (ORG-8897)

 

14. Expose Column method GetAdditionalInfo to OC for getting additional text (ORG-9101)

...

X-Function to add all sorts of Origin files (ORG-9127)

Code Block
void test_GetAdditionalInfo()
{
	Worksheet wks = Project.ActiveLayer();
	Column col(wks, 0);
	string strTextInfo;
	col.GetAdditionalInfo(strTextInfo);
	out_str(strTextInfo);
}

 

15. Better error checking in LabTalk function (ORG-9155)

Method to get date and time custom display format from COM (ORG-9156)

Add option for XYRange to ignore X range (ORG-9185)

Access to select each plot when the same dataset been plotted twice (ORG-9192)In an OGS file, add the following script, and then run the main section, the error message will go to Message Log.

Code Block
[Main]
Function int aa(int nn)
{
	ty "inside function";
	sdf;//error
	return 1;
}

int nErr = aa(0);
ty "after function";