Retrieve All Layers from the Visio Diagram in PHP

Aspose.Diagram - Retrieve All Layers

To Retrieve All Layers using Aspose.Diagram Java for PHP, simply invoke GetAllLayers module. Here you can see example code.

PHP Code

 # Create instance of Diagram

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

\# get Visio page

$page=$diagram->getPages()->getPage(0);

$layers=$page->getPageSheet()->getLayers();

$i = 0;

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

$layer=$layers->get($i);

print "Name: " . (string)$layer->getName()->getValue();

print "Visibility: " . (string)$layer->getVisible()->getValue();

print "Status: " . (string)$layer->getStatus()->getValue();

$i += 1;

}

Download Running Code

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