Set Visio Shape's Line Data in PHP
Contents
[
Hide
]
Aspose.Diagram - Set Visio Shape’s Line Data
To Set Visio Shape’s Line Data using Aspose.Diagram Java for PHP, simply invoke SetShapeLineData module. Here you can see example code.
PHP Code
# Create instance of Diagram
$diagram = new Diagram($dataDir."Drawing.vsd");
$shapes = $diagram->getPages()->getPage(0)->getShapes();
$i=0;
while ($i<(int)(string)$shapes->getCount()) {
$shape = $shapes->get($i);
if ($shape->getNameU() == "rectangle" && (int)(string)$shape->getID() == 1) {
$shape->getLine()->getLineColor()->setValue($diagram->getPages()->getPage(0)->getShapes()->getShape(1)->getFill()->getFillForegnd()->getValue());
$shape->getLine()->getLineWeight()->setValue(0.07041666666666667);
$shape->getLine()->getRounding()->setValue(0.1);
}
$i += 1;
}
\# Save diagram
$saveFileFormat=new SaveFileFormat();
$diagram->save($dataDir."SetShapeLineData.vdx", $saveFileFormat->VDX);
print "Set visio shape's line data.".PHP_EOL;
}
Download Running Code
Download Set Visio Shape’s Line Data (Aspose.Diagram) from any of the below mentioned social coding sites: