usmanazizgroupdocs
4/21/2017 - 9:07 AM

GetListOfLayoutsOfCADDocument.vb

' For complete examples and data files, please go to https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET
'Get Configurations
Dim config As ViewerConfig = Utilities.GetConfigurations()

' Create html handler
Dim htmlHandler As New ViewerHtmlHandler(config)

' Guid implies that unique document name 
Dim guid As String = DocumentName

' Set CAD options to get the full list of Layouts
Dim documentInfoOptions As New DocumentInfoOptions()
documentInfoOptions.CadOptions.RenderLayouts = True

' Get DocumentInfoContainer and iterate through pages 
Dim documentInfoContainer As DocumentInfoContainer = htmlHandler.GetDocumentInfo(guid, documentInfoOptions)
For Each page As PageData In documentInfoContainer.Pages
    Console.WriteLine("Page number: {0} - {1}", page.Number, page.Name)
Next