BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Excel to Rack Elevation Perl Script

Started by al grithem, March 03, 2017, 03:54:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

al grithem

I appreciate all of the help from this site.  Hopefully someone will get some benefit from the attached Perl script which reads device information from an Excel file and generates a Visio rack elevation document of the devices listed.

              1. A Visio stencil file called RE_Shapes.vss (sample included) containing stencils for all devices in your inventory.  This file
                 should be in the same directory as the script.  The script uses the Default Rack stencil based off a 48U Great Lakes rack
                 by default but this can be modified with variables in the script.   I had to strip this down to bare minimum to meet the size requirements for posting but it has enough to give you the general idea.

              2. An Excel file listing all devices and their sizelocations. The script will prompt for this file when executed. The first six columns
                 of this spreadsheet must be as follows

                    Column A - Visio Stencil Name - The names in this column need to match exactly with the stencil names in the RE_Shapes.vss stencil file.
                    Column B - Row - Some unique identifier for a row of cabinets.  The script will create a separate tab for each Row name found.
                    Column C - RackCabinet - Unique name for each cabinet in a given row (no special characters)
                    Column D - Bottom RU - The lowest rack unit for the device.  The script assumes a bottom up number scheme in the rack.
                    Column E - Height (in RUs) - The number of RUs the device occupies in the rack.  This should be a number between 0 and 48.
                               Devices with zero height will be listed as a component in the data fields for the main device at that base RU (BRU).
                    Column F - Device name.

                 Any additional columns will be stored as Visio shape data fields.

                 Any devices with Future or Reserved in column F will use the placeholder rectangle shape.  This will also be used for any devices where a stencil isn't found.

     Output  Input_Filename_Elevation_MMDDYYYY.vsd

I've included a sample device list as well.

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 134 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1050KB.
Tokens: post-login.
Cache hits: 14: 0.00192s for 26,767 bytes (show)
Cache misses: 3: (show)
Queries used: 16.

[Show Queries]