GetProperty
Returns a property of the CDocBuilderValue
object.
Please note, that for the
.docbuilder
file theCDocBuilderValue.GetProperty
method 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
Get
method 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"]