Features, discussions, tips, tricks, questions, problems and feedback

Import / Export Graphic Forms to XML (Find / Replace)

The graphic form below provides an example, through C# scripting, of how to export a graphic form’s components to XML, for find/replace purposes using a text editor for example:

These XML documents can then be altered and imported into .VIZ files again.

The script can also be modified and extended to return other parts of the graphic form, for example.

The graphic form can be downloaded here:

Export/Import Graphic Form

Please note: Take care when editing a document in XML format, as any damage to the actual XML structure will result in a corrupt graphic form. It is recommended to make a backup of the form, before importing.

1 Like

The updated version of the import/export graphic form can be found below. This version supports wizards, and preserves the directory structure of the project.

Updated Export/Import Graphic Form:

ExportImport.viz (53.8 KB)


Updated to include .VIZ and .VIZW files in default search criteria (*.viz* wildcard):

ExportImport2.viz (51.3 KB)

1 Like

Hi, tried out this but it didn’t seems to replace strings inside the files. the file structure is created but not the substitutions. Am i doing something wrong? The idea is great though!

Did You enabled developer mode for XML editing in Config Editor?

Remember that the import / export Graphic Form mentioned in this article will only EXPORT files to XML and re-IMPORT the XML files into their .VIZ or .VIZW counterparts.

The actual Find / Replace will need to be done with a Text editor (like Notepad++ for example). Also ensure that the structure of the XML is not compromised after the Replace operation, otherwise the import will fail.


Important note: If the dataelement tags that you want to change have a unique name then it will be sufficient to do a replace all on that text, if that is not the case then you must be careful to not replace unrelated information as you might make the file unusable.

Example: if we have agents named AB_XX_PM_… and we want to change those to be CD_YY_AN_… then that is unique enough to do a replace all on the xml file.

Important areas to note in an exported file when using the ExportImport3 graphic form

  1. We can change the relevant dataelement values under the “BehaviorComponent” xml tags to change the dataelements used in our behaviors.

  2. In the xml we can look for an object tag as below (this is to find our wizard instances on our graphic form)

  3. Within the xml tag mentioned above, you can look for a xml property tag as below. The text immediately after “Wizard:” is the path of the source wizard of this wizard instance. If you are planning on also importing the source wizard along with this graphic form to a folder structure with a different path, then you will need to change that wizard path so that the instance is aware of where the new source wizard is. Alternatively leave the path as is.

  4. After the wizard path you will see “AssigmentSummary:”, this is where the substitutions for this instance and the substituted values are. You can change the substitution values here for this wizard instance.

  5. In the SpiderXML section there will be information as below for spiders and silks. Change the relevant tags in both places to ensure that your spiders and silks are using the desired dataelements.



ExportImport3.viz (57.2 KB)

1 Like