module Asposediagramjava::ExportToHtml

Public Class Methods

new() click to toggle source
# File lib/asposediagramjava/Export/exporttohtml.rb, line 3
def initialize()
    data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'

    # Call the diagram constructor to load diagram from a VSD file
    diagram = Rjb::import('com.aspose.diagram.Diagram').new(data_dir + "Drawing.vsd")

    # Save as Html
    diagram.save(data_dir + "Diagram.html", Rjb::import('com.aspose.diagram.SaveFileFormat').HTML)

    puts "Exported visio diagram to HTML."
end