2.2.4.8.28 DataPlot::LabTalk

Description

Perform the same action as the LabTalk Set Get command on a data plot.

Syntax

int LabTalk( LPCSTR lpcszCmd, int * pnVal, BOOL bSet = true )

Parameters

lpcszCmd
[input] the cmd part of the LabTalk string in the form of "set %C -cmd value".
pnVal
[modify] input for bSet = true, output for bSet = false.
bSet
[input] true to set the plot property, false to get it.

Return

0 if success, otherwise an error code.

Examples

// It must create a label plot and make it be the second layer
// before run this example.
void DataPlot_LabTalk_ex1()
{
	GraphLayer gl = Project.ActiveLayer();
	if (!gl)
		return;
	
	DataPlot dp = gl.DataPlots(1);
	if (!dp)
		return;
	
	int nValue = 40;
	int nRet;
	
	// For more labtalk command like "ts",
	// please see the Set and Get part of the 
	// LabTalk manual.  
	nRet = dp.LabTalk("ts", &nValue, true);
	
	if (nRet == 0)
		out_str("Set label font size success.");
	else
		out_str("Set label font size fail.");
}

Remark

Only Laltalk 'Symbol Related Options' and 'Text Label Plot' command can be used.

See Also

Header to Include

origin.h