Set Milestone Shape Properties in Ruby
Contents
[
Hide
]
Aspose.Diagram - Set Milestone Shape Properties
To Set Milestone Shape Properties using Aspose.Diagram Java for Ruby, simply invoke SetMilestoneShapeProperties 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")
shape_id = 1
\# Get timeline shape
milestone = diagram.getPages().getPage("Flow 1").getShapes().getShape(shape_id)
\# Initialize MilestoneHelper object
milestone_helper = Rjb::import('com.aspose.diagram.MilestoneHelper').new(milestone)
\# Set date format
milestone_helper.setDateFormat(21)
\# Set auto update flag
milestone_helper.setAutoUpdate(true)
\# Set milestone type
milestone_helper.setType(6)
\# Save diagram
diagram.save(data_dir + "SetMilestoneShapeProperties.vdx", Rjb::import('com.aspose.diagram.SaveFileFormat').VDX)
puts "Set milestone shape properties."
Download Running Code
Download Set Milestone Shape Properties (Aspose.Diagram) from any of the below mentioned social coding sites: