Set Milestone Shape Properties in PHP

Aspose.Diagram - Set Milestone Shape Properties

To Set Milestone Shape Properties using Aspose.Diagram Java for PHP, simply invoke SetMilestoneShapeProperties module. Here you can see example code.

PHP Code

 # Create instance of Diagram

$diagram = new Diagram($dataDir."Drawing.vsd");

$shape_id=1;

\# Get timeline shape

$milestone=$diagram->getPages()->getPage("Flow 1")->getShapes()->getShape($shape_id);

\# Initialize MilestoneHelper object

$milestone_helper = new MilestoneHelper($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

$saveFileFormat=new SaveFileFormat();

$diagram->save($dataDir."SetMilestoneShapeProperties.vdx", $saveFileFormat->VDX);

print "Set milestone shape properties.".PHP_EOL;

Download Running Code

Download Set Milestone Shape Properties (Aspose.Diagram) from any of the below mentioned social coding sites: