Archive for August 6th, 2008

Script to export column selection

We (with a little help of Aleksandar ;)) have uncovered an issue in the way export functionality works in PowerGUI 1.5.1 – basically column selection and order may not get preserved newly added nodes and links. This can be pretty frustrating because people importing your powerpack may not get the exact look and feel you had when exporting it.

However, the good news is that you don’t have to wait for our next release to have this fixed. Posted to the script repository is a script which fixes the issue for you!

Basically, in this script, I am taking advantage of the open-source nature of PowerPacks and PowerGUI configuration. Both are just XML files, so I:

  1. Go through the PowerGUI config file and grab all the column information for each type, and store it in a hash table.
  2. Then I go through the powerpack file, and if I find a node or a link with no columns specified, I check whether my hash table has info for the type.
  3. If it does, I create the corresponding XML structure and insert it into the node/link XML element.

So if you are exporting any PowerPacks with version 1.5.1 or participating in the PowerPack challenge, this script may come handy. Just change the filepaths in the beginning of the script and run it.

Here’s the script: update-columnsinpowerpack.ps1 – let me know if you have any questions or issues with it.

Tags: , , , ,


My Recent Tweets


The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer - WSO2 or anyone else for that matter. All trademarks acknowledged.

© 2007-2014 Dmitry Sotnikov

August 2008

%d bloggers like this: