SmartDraw's Open API

The SmartDraw Open API allows you to format data from any source in such a way that lets you skip the drawing process and generate diagrams from data automatically.

What Makes SmartDraw's API Easy

Other diagramming API's, like Visio's for example, require you to specify the coordinates of every shape and line in the diagram. This makes generating a diagram with code tedious and complex.

The SmartDraw API is very different because it leverages SmartDraw's intelligent formatting engine, the ability to automatically format and connect shapes on a page based on their relationships.

SmartDraw simple to use API

The VisualScript SDK

The VisualScript SDK provides an object model that allows a developer to format data so they can become diagrams in SmartDraw.

It is the foundation of SmartDraw's Open API. It's easy to use because it leverages SmartDraw's intelligent formatting to make specifying a tree or a flow as simple as specifying the parents and children. No positioning information is needed because the intelligent formatting engine knows how to lay them out perfectly on the page.

This simple JavaScript is rendered as an org chart:

{
					var vs = new VS.Document(); //Create a new VisualScript document
					var theShape= vs.GetTheShape();
					var myConnector=theShape.AddShapeConnector(VS.ShapeConnectorTypes.OrgChart);  //add the org chart connector to the top shape
					myConnector.AddShape(); //add the first shape to the connector
					myConnector.AddShape(); //add the second shape to the connector
					}
				
Simple org chart described using VisualScript

Without this power it would not be practical to generate the kind of diagrams you need with code.

Documentation for VisualScript

Learn how to write SmartDraw Extensions using the VisualScript SDK.

Click Here to Get Expert Help

Contact Us
By continuing to use the website, you consent to the use of cookies.   Read More