Jump to content

How to get "Keywords" of a Library Item, type of dxp (an analysis) using Python script

Milan Jankovic

Recommended Posts

## I am reading the Library list by script:

lb = Application.GetService[LibraryManager]()

items = lb.Search("type:dxp", LibraryItemRetrievalOption.IncludePath, LibraryItemRetrievalOption.IncludeProperties)

for item in items:

guid = item.Id

path = item.Path

analysis = item.Title

description = item.Description

## I cannot get Keywords by:

Keywords = Item.Keywords # Error: 'LibraryItem' object has no attribute 'Keywords'

## Please note that I cannot use the script below which returns Keyword of the active report (not the keywords of the analysis read from the library):

for prop in Document.Data.Properties.GetProperties(DataPropertyClass.Document):

if str(prop.Name).rstrip() == 'Keywords':

keywords = str(prop.Value)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...