Retrieve Visio Shape Information in PHP

Aspose.Diagram - Retrieve Visio Shape Information

To Retrieve Visio Shape Information using Aspose.Diagram Java for PHP, simply invoke GetShapeInfo module. Here you can see example code.

PHP Code

 # Create instance of Diagram

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

$shapes = $diagram->getPages()->getPage(0)->getShapes();

$i = 0;

while ($i<(int)(string)$shapes->getCount()) {

$shape = $shapes->get($i);

\# Display information about the shapes

print "Shape ID : " . (string)$shape->getID().PHP_EOL;

print "Name : " . (string)$shape->getName().PHP_EOL;

print "Master Shape : ".(string)$shape->getMaster()->getName().PHP_EOL;

$i += 1;

}

Download Running Code

Download Retrieve Visio Shape Information (Aspose.Diagram) from any of the below mentioned social coding sites: