cancel
Showing results for 
Search instead for 
Did you mean: 
David_Deran
Confirmed Champ
Confirmed Champ

This post will cover updates to the Unity API not large enough to cover with a dedicated blog post, but important to highlight. These changes include: Keysets can now be expanded when Reindexing a document, Template Builder for Unity Scripts to OnBase Studio has been added, Support for returning OLE and PDF page counts, and Support for the CreateWorkviewObject Unity Pop action.

 

Expanding Keysets

New in 17 is the flag ExpandKeysets in ReindexProperties! Setting ReindexProperties.ExpandKeysets to true and adding the primary Keyword of the Keyset to ReindexProperties places the other Keywords in the Keyset to the Reindexed Document. This functionality is similar to the option available when storing a new document. The expanded keyset will override any set values.

Storage

storage = application.Core.Storage; ReindexProperties reindexProps = storage.CreateReindexProperties(document, documentType); Keyword testKey = reindexDocumentType.AutoFillKeyset.PrimaryKeywordType.CreateKeyword(PRIMARY_KEY_VALUE); reindexProps.AddKeyword(testKey);reindexProps.ExpandKeysets = true;resultDoc = storage.ReindexDocument(reindexProps);

Template Builder

This feature was one of the last holdouts from the old configuration editor. The Template Builder has made the move to OnBase Studio, and can be located in the Unity Scripts Ribbon. This will allow the customization of what using statements are included upon creation of new scripts as well as changing the default namespace. Setting indentation to being a tab or set number of spaces is also available here.

OLE and PDF page counts

The Unity API can now retrieve actual page counts form PDF and Microsoft Office based documents! The page number attribute is located on a Rendition object with the property name of NumberOfPages. Supported types of files that return valid page numbers now include Images, PDF, MS Word, MS Excel, MS PowerPoint, and MS Outlook.

CreateWorkviewObject UnityPop Action

The Unity API can now generate UPop links that create WorkView Objects.

Hyland.Unity.WorkView.Application wvApp = application.WorkView.Applications.Find("someWVApp");Class wvClass = wvApp.Classes.Find("someClass");CreateWorkViewObjectGenerator wvObjGenerator = wvClass.Upop().CreateWorkViewObjectGenerator();wvObjGenerator.AddAttributeValue("someFieldName", "someValue");string upopLink = wvObjGenerator.CreateUpopLink();

Conclusion

These enhancements are welcome additions to the Unity API. These exciting changes completes bringing OnBase Studio to full parity to the old configuration editor, completes our Unity Pop project, and enhances the page count property to support OLE and PDF file types!

Look forward to next week when we discuss how and why to get certified for the Unity API!