Add Window Element to the Visio Instance in PHP

Aspose.Diagram - Add Window Element to the Visio Instance

To Add Window Element to the Visio Instance using Aspose.Diagram Java for PHP, simply invoke AddWindowElement module. Here you can see example code.

PHP Code

 # Create instance of Diagram

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

\# initialize window object

$window = new Window();

\# set window state

$windowStateValue=new WindowStateValue();

$window->setWindowState($windowStateValue->MAXIMIZED);

\# set window height

$window->setWindowHeight(500);

\# set window width

$window->setWindowWidth(500);

\# set window type

$windowTypeValue=new WindowTypeValue();

$window->setWindowType($windowTypeValue->STENCIL);

\# add window object

$diagram->getWindows()->add($window);

\# save in any supported format

$saveFileFormat=new SaveFileFormat();

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

print "Added window element to the visio instance.".PHP_EOL;

Download Running Code

Download Add Window Element to the Visio Instance (Aspose.Diagram) from any of the below mentioned social coding sites: