First Look: Exporting a Map to Visio
You can export a map from Asset Manager to use it in your Microsoft Visio 16x application. This feature makes Asset Manager maps available to those who lack access to Asset Manager and gives them a way to add metadata to the Visio maps, Visio nodes, and Visio edges. To accomplish this, Asset Manager generates a Visio-compatible ".vsdx" map file. The file includes map node images, location information, and metadata about the node such as its IP address, DNS name, device profile attributes (type, vendor, model, OS, OS version, sysname, MAC addresses).
The Visio file contains the same information as the Asset Manager map, though the visual representation in Visio will not be the same. Once imported to Visio and during this "first look" preview, you will need to manipulate the Visio layering options and filters to achieve the map display you want.
The new Visio map export capability is available in the Asset Manager GUI and can be executed from the Asset Manager API.
Export a Map
To export the current map from the Asset Manager GUI:
- It's a best practice (though not required) to drag and adjust the map nodes to your preferred layout.
- With that layout in place, click the Save icon.
It is possible to export a map without saving it. The Export functionality is independent of the Save functionality. - Click the Export Map to Visio icon to download your Visio-compatible map file to your local system.
- All map data is exported to your local system as a Visio file that can be opened in Visio.
- Asset Manager 3.3 and later users have the option to export faster by constraining the types of data to export. After clicking Export Map to Visio icon in Asset Manager 3.3, select which types of data to export.
Option Selected | Behavior |
---|---|
All | The Visio Export default behavior is to "export all," which means that all Layer 3 devices, all Layer 2 devices and all endpoints are exported to a Visio file. Both check boxes are selected for the default behavior. |
Attached Hosts | Only endpoints (which don't forward traffic) such as workstations, laptops, and smart phones, are exported. In this context, "attached hosts" are neither Layer 3 nor Layer 2 devices. |
Layer 2 Hosts | Only Layer 2 devices such as switches are exported |
None | Only Layer 3 devices that forward traffic such as routers are exported |
Map data of the types you selected are exported to your local system as a Visio file that can be opened in Visio.
How is this done?
On the back end of Asset Manager, this functionality is accomplished through a Java utility and a Python script. The Command Center CLI passes parameters to the Java utility that then calls a Python script. This script posts API calls to retrieve information about map nodes, edges, attached hosts, and more. The Java utility then creates a Visio vsdx file of this "shape data," which can then be imported to Visio.
Export a Map to Visio via Asset Manager API
The API export works both synchronously and asynchronously.
API Call | Method | Request | JSON Response | Description |
---|---|---|---|---|
/api/rest/map/visio/zone/{zoneID} | POST |
zoneID is in URL |
200 OK
{ "status": "OK", "result": "UUIDhere"} |
Initial call to generate visio document. Requires zone ID Before this request is made, the map should save the positions of the nodes and layout to ensure an accurate display. After API returns OK, map UI will disable the "Generate Visio" button and show a progress state. |
/api/rest/map/visio/document/{documentID} | GET | documentID is in URL |
Visio document is served from here if ready.
|
This API call is polled periodically to see if the job is ready. When the file is ready it will be served from this URL. Anything besides 200 means something went wrong or it's not ready. All exported Visio documents will be stored here: /usr/local/Asset Manager/Asset Manager-webapp/visio-export This directory should be created as part of the build process as well. |
/api/rest/map/visio/document/{documentID}/status | GET | documentID is in URL |
{ "status": "OK", "result": true } |
This API returns true or false based on whether the Visio document is finished processing and ready for download. |