GetProperty

def GetProperty(self, name: str)

Description

Returns a property of the CDocBuilderValue object.

Please note, that for the .docbuilder file the CDocBuilderValue.GetProperty method is not used.

Parameters

namestr
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:

  1. 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")
    
  2. 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"]
    

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).