GetProperty
Returns a property of the CDocBuilderValue object.
Please note, that for the
.docbuilderfile theCDocBuilderValue.GetPropertymethod is not used.
Syntax
def GetProperty(self, str name);
Parameters
| Parameter | Type | Description |
|---|---|---|
| name | str | The name of the CDocBuilderValue object property. |
Example
Python
builder = docbuilder.CDocBuilder()
context = builder.GetContext()
globalObj = context.GetGlobal()
api = globalObj["Api"]
document = api.Call("GetDocument")
docPr = document.GetProperty("color")
There are two more ways to get a property of the CDocBuilderValue object:
-
use the
Getmethod that takes an argument in the string format:def Get(self, name);Example
Python
builder = docbuilder.CDocBuilder()
context = builder.GetContext()
globalObj = context.GetGlobal()
api = globalObj["Api"]
document = api.Call("GetDocument")
docPr = document.Get("color") -
use the
default[]postfix expression that takes an argument in the string format:property CDocBuilderValue default[str]Example
Python
builder = docbuilder.CDocBuilder()
context = builder.GetContext()
globalObj = context.GetGlobal()
api = globalObj["Api"]
document = api.Call("GetDocument")
docPr = document["color"]