Short answer
You rebuild the unit type as a .utt file from two parts: its icon folder on the Orchestra server and its unit.xml template from the qp_central database. Zip both together and rename the extension to .utt. You can then import the file into another Orchestra system.
This FAQ uses the unit type statToOpspanelInfo as the example. Replace it with the name of your own unit type in every step.
What do I need before I start?
- The template name of the unit type. Find it in Orchestra under unit type administration, in the Template name field. Use this name, not the display name, in all steps below.
- Access to the unit type icon. Either file system access to the Orchestra server, or a login to Orchestra (see the alternative under step 1).
- Query access to the
qp_centraldatabase. Use a SQL client such as SQL Server Management Studio. For Postgresql, use pgAdmin. - A zip tool, for example 7-Zip. Do not use the zip functionality from windows explorer.
How do I extract the unit type?
- Copy the unit type folder. On the Orchestra server, go to
media>unit>templatesand copy the folderstatToOpspanelInfoto a working location. It contains the iconunit.png.
- No file system access? Log in to Orchestra and open the Add Unit Type window. Right-click the unit type icon and choose Copy Image Link.
- Paste the link into a new browser tab. The part between
templatesandunit.pngis the folder name. - Create a folder with that name. Right-click the image, choose Save as and save it as
unit.pngin the new folder.
Query the template data. Run this query against the database:
SELECT data FROM qp_central.qp_central.unit_template WHERE name = 'statToOpspanelInfo'
- Save the result as
unit.xml. Right-click the result and select Save Results As.... Save it asunit.xmlin the folder from step 1. Do not copy the cell directly: the data is large and the copy will be incomplete.
- Remove the header line. Open
unit.xmlin a text editor and delete the first line, which only saysdata. The file must start with<?xml version="1.0" ....
- Zip and rename. Open the folder, select its contents (
unit.pngandunit.xml) and zip them, for example with 7-Zip > Add to "statToOpspanelInfo.zip". Zip the files inside the folder, not the folder itself.
Then change the extension from.zipto.utt.
Common questions
The query returns no rows. What is wrong? You probably used the display name. The WHERE name = value must match the Template name shown in unit type administration, including upper and lower case.
My unit.xml is cut off. Why? The result was copied from the grid instead of saved. Use Save Results As... so the full template is written to the file.
The .utt file is not accepted. What should I check?
- The first line
datais removed fromunit.xml. unit.pngandunit.xmlsit at the root of the archive, not inside a subfolder.- The extension is
.utt, not.utt.zip. Turn on file name extensions in Windows Explorer to check.