Set Appearance of the Connector Type Shape in Visio in Ruby
Contents
[
Hide
]
Aspose.Diagram - Set Appearance of the Connector Type Shape in Visio
To Set Appearance of the Connector Type Shape in Visio using Aspose.Diagram Java for Ruby, simply invoke SetShapeAppearance 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(data_dir + "Drawing.vsd")
\# Access a particular page
page = diagram.getPages().getPage("Flow 1")
\# get a particular connector shape
shape = page.getShapes().getShape(1)
\# set dynamic connector appearance
shape.setConnectorsType(Rjb::import('com.aspose.diagram.ConnectorsTypeValue').STRAIGHT_LINES)
\# Save diagram
diagram.save(data_dir + "SetShapeAppearance.vdx", Rjb::import('com.aspose.diagram.SaveFileFormat').VDX)
puts "Set appearnce of the connector type shape."
Download Running Code
Download Set Appearance of the Connector Type Shape in Visio (Aspose.Diagram) from any of the below mentioned social coding sites: