More OC Access 2022b


Version: 2022b

Type: Features

Category: Programming

Subcategory: Origin C

Jira: ORG-24639


1.Added a global oc function: int nn = FindRangeByName(strName, &str, false)

Example:

void dd(string strName="alpha")
{
	string str;
	int nn = FindRangeByName(strName, &str);
	if(nn < 0)
		out_str("No range found!");
	else
		printf("found %s, scope=%d\n", str, nn);
	return;
}

2.Added an oc function to Worksheet class:int GetCellsWithNotes(vector<int>& vCols, vector<int>& vRows)

Example:

void pcn()
{
	Worksheet wks = Project.ActiveLayer();
	vector<int> vcols, vrows;
	int nn = wks.GetCellsWithNotes(vcols, vrows);
	for(int ii = 0; ii < nn; ii++) {
		string strNote;
		wks.GetCellComment(vrows[ii], vcols[ii], strNote);
		//strNote might have CRLF, and need to end with \r\n here
		printf("%d. row,col=%d,%d:(%s)\r\n", ii+1, vrows[ii]+1, vcols[ii]+1, strNote);
	}
}