Create an empty Visio Diagram in Ruby

Aspose.Diagram - Create an empty Visio Diagram

To Create an empty Visio Diagram using Aspose.Diagram Java for Ruby, simply invoke CreateDiagram module. Here you can see example code.

Ruby Code

 data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'

\# Create instance of Diagram

diagram = Rjb::import('com.aspose.diagram.Diagram').new

\# Save as VDX

diagram.save(data_dir + "CreateDiagram.vdx", Rjb::import('com.aspose.diagram.SaveFileFormat').VDX)

puts "Created visio diagram successfully!"

Download Running Code

Download Create an empty Visio Diagram (Aspose.Diagram) from any of the below mentioned social coding sites: