Returns a property of the CDocBuilderValue object.
Name | Type | Description |
sName | String^ | The name of the CDocBuilderValue object property. |
string workDirectory = "C:/Program Files/ONLYOFFICE/DocumentBuilder"; CDocBuilder.Initialize(workDirectory); CDocBuilder oBuilder = new CDocBuilder(); CContext oContext = oBuilder.GetContext(); CValue oGlobal = oContext.GetGlobal(); CValue oApi = oGlobal["Api"]; CValue oDocument = oApi.Call("GetDocument"); CValue oDocPr = oDocument.GetProperty("color"); CDocBuilder.Destroy();
There are two more ways to get a property of the CDocBuilderValue object:
use the Get method that takes an argument in the string format:
CDocBuilderValue^ Get(String^ name);
string workDirectory = "C:/Program Files/ONLYOFFICE/DocumentBuilder"; CDocBuilder.Initialize(workDirectory); CDocBuilder oBuilder = new CDocBuilder(); CContext oContext = oBuilder.GetContext(); CValue oGlobal = oContext.GetGlobal(); CValue oApi = oGlobal["Api"]; CValue oDocument = oApi.Call("GetDocument"); CValue oDocPr = oDocument.Get("color"); CDocBuilder.Destroy();
use the default[] postfix expression that takes an argument in the string format:
property CDocBuilderValue^ default[String^]
string workDirectory = "C:/Program Files/ONLYOFFICE/DocumentBuilder"; CDocBuilder.Initialize(workDirectory); CDocBuilder oBuilder = new CDocBuilder(); CContext oContext = oBuilder.GetContext(); CValue oGlobal = oContext.GetGlobal(); CValue oApi = oGlobal["Api"]; CValue oDocument = oApi.Call("GetDocument"); CValue oDocPr = oDocument["color"]; CDocBuilder.Destroy();