How to copy a Gliffy diagram

The Gliffy blog gives a great description of how to copy elements from one Gliffy diagram to another. Here’s a slightly different technique, for copying an entire Gliffy diagram from one Confluence page to another. You could also use this technique to copy a diagram from one Confluence site to another.

I demonstrated this technique to a colleague recently, and I’ve decided to blog about it in case anyone else finds it useful. In summary:

  • Go to the Confluence page that contains the Gliffy diagram and download the attached file that has the scary comment “GLIFFY DIAGRAM, ONLY EDIT IN GLIFFY EDITOR!” This is the Gliffy data file.
  • Remove any extension that your browser may add to the file name.
  • Upload the Gliffy data file as an attachment to the page where you want a copy of the diagram.
  • Insert the Gliffy macro onto the Confluence page. For the diagram name, give it the name of the attached Gliffy data file.
  • If the diagram shows up as empty, open and close the Gliffy editor to jog the diagram into life.

Step 1. Download the Gliffy diagram’s data file

Gliffy stores all the information about a diagram in a file attached to the Confluence page. The attachment’s name is the name of your diagram. The comment next to the attachment lets you know in no uncertain terms that you shouldn’t mess with this data file.😉

Here’s a Gliffy diagram displayed on a Confluence page (click the image to see a larger version):

How to copy a Gliffy diagram

This screenshot shows the Gliffy data file attached to the Confluence page:

 

How to copy a Gliffy diagram

How to copy a Gliffy diagram

 

Download the Gliffy data file onto your computer:

  1. Go to the Confluence page that contains the diagram, and select “Tools” then “Attachments” to get to the “Attached Files” page as shown above.
  2. Find the Gliffy data file in the list of attached files. The file name will be the name of your diagram. (In my case, it’s “Atlassian Plugin Development Platform”, which is a bit unfortunate because that’s also the page name. Please excuse any confusion that may cause!) The “Comment” column contains the words “GLIFFY DIAGRAM, ONLY EDIT IN GLIFFY EDITOR!” next to the relevant attachment.
  3. Right-click the file name and select “Save link as…” (or whatever words your browser uses to offer you the ability to download a file and save it on your computer).
  4. Save the file on your computer.
  5. Check the file name on your computer carefully. It should be just the diagram name, without an extension. In my case, it’s just “Atlassian Plugin Development Platform”.
    Note: Some browsers (IE, I’m looking at you) add an extension, often “.xml” or “.htm”. If that’s happened, remove the extension.
  6. If you like, you can change the file name itself, if you want your new diagram to have a different name. I’ve decided to change mine to “CopyTest”.

Step 2. Upload the Gliffy data file to another page

Now you can just upload the Gliffy data file, in the same way as you would upload an image, a screenshot or any other attachment.

  1. Go to the Confluence page where you want to add the diagram, and select “Tools” then “Attachments” to see the “Attached Files” page.
  2. Drag and drop the Gliffy data file onto the “Attached Files” page, or click “Browse” and upload the file in the usual way.

Here’s my Gliffy data file, now called “CopyTest”, attached to a Confluence page. Notice that it does not yet have the Gliffy warning in the comment column. This is because neither Gliffy nor Confluence knows at this stage that the file is actually a Gliffy file.

 

How to copy a Gliffy diagram

How to copy a Gliffy diagram

FYI, the Gliffy data file contains a lot of text. In my case, the file starts with this text:

<stage keygen_seq="71"><pageObj drawingHeight="550" drawingWidth="700"

 

Step 3. Insert the Gliffy macro onto the Confluence page

Now you just need to let Gliffy and Confluence know there’s a diagram on the page. You do that by adding the Gliffy macro onto the page.

If you’re a wiki markup fan, just copy the markup from the original page and update the diagram name if you changed it. In my case, the original wiki markup looked like this:

{gliffy:name=Atlassian Plugin Development Platform|align=left|size=L}

I have changed the name of my diagram to “CopyTest”, so I inserted the following markup onto my page:

 

How to copy a Gliffy diagram

How to copy a Gliffy diagram

 

If you prefer to use the rich text editor and the macro browser, then just supply the file name and other parameters in the usual way.

Step 4. Edit the Gliffy diagram to cement the relationship

Often, the relationship between the Confluence page and the Gliffy diagram needs a jolt to get it started! After adding the macro, you may notice that your Gliffy diagram looks empty:

 

How to copy a Gliffy diagram

How to copy a Gliffy diagram

 

Just click “Edit Diagram” under the empty box to open the Gliffy editor. Then close the editor again.

Voilà!

 

How to copy a Gliffy diagram

How to copy a Gliffy diagram

 

My environment

I’m using Gliffy 2.0.2 on Confluence 3.3.3.

Hmm, that’s quite an old version of Gliffy. I see that the latest version is 3.0.6! I’ll lodge a request to get our plugin upgraded.🙂

Older versions of Gliffy included the page name etc in the macro data

Older versions of Gliffy used to include more information in the macro data: the space name, page name and page ID. For example, your wiki markup may look like this:

{gliffy:name=Network topology|space=DOC|page=Recommended network topology|pageid=107610617|align=left|size=L}

Note: If your version of Gliffy does this, you will need to change the space name, page name and page ID to match the new page where you have put the copy of the diagram. This is very important. If you leave them at the old values, then the new page will actually display the diagram from the original page, not from its own attachment. This can lead to unexpected results, especially when someone edits the diagram from either page.

What about JIRA?

I wonder if you could use this technique to copy a diagram from JIRA to Confluence or vice versa? Let me know if you’ve tried it.

<stage keygen_seq=”71″><pageObj drawingHeight=”550″ drawingWidth=”700″ istt=”true” print_scale=”0″ print_grid=”0″ print_paper=”LETTER” print_layout=”0″ pb=”0″ stg=”1″ gr=”1″ fill=”16777215″ height=”550″ width=”700″><styles><shapeStyle lineColor=”global:0x333333″ fillColor=”global:26112″ gradientOn=”true” dropShadowOn=”false” lineWidth=”-1″/><lineStyle end=”0″ begin=”0″ width=”1″ pattern=”0″ color=”0x333333″/><textStyle color=”0″ style=”bold=true” size=”18″ face=”Arial”/></styles><objects><object order=”0″ dshad=”false” gradon=”true” linew=”2″ linec=”3355443″ fill=”3963061″ text-horizontal-pos=”center” text-vertical-pos=”middle” lock=”false” fixed-aspect=”false” rot=”0″ height=”80″ width=”480″ y=”528″ x=”290.5″ libraryid=”com.gliffy.basic” shp_id=”2″ class=”round_rect”><text><![CDATA[<P ALIGN=”CENTER”><FONT FACE=”Arial” SIZE=”12″ COLOR=”#000000″ LETTERSPACING=”0″ KERNING=”0″><B>Atlassian Plugin Framework</B></FONT></P>]]></text><connlines/></object><object order=”1″ dshad=”false” gradon=”true” linew=”2″ linec=”3355443″ fill=”3963061″ text-horizontal-pos=”center” text-vertical-pos=”middle” lock=”false” fixed-aspect=”false” rot=”0″ height=”80″ width=”145″ y=”528″ x=”621″ libraryid=”com.gliffy.basic” shp_id=”4″ class=”round_rect”><text><![CDATA[<P ALIGN=”CENTER”><FONT FACE=”Arial” SIZE=”12″ COLOR=”#000000″ LETTERSPACING=”0″ KERNING=”0″><B>Static plugins</B></FONT></P><P ALIGN=”CENTER”><FONT FACE=”Arial” SIZE=”12″ COLOR=”#000000″ LETTERSPACING=”0″ KERNING=”0″><B>(v1)</B></FONT></P>]]></text><connlines/></object><object order=”2″ dshad=”false” gradon=”true” linew=”2″ linec=”3355443″ fill=”3963061″ text-horizontal-pos=”center” text-vertical-pos=”middle” lock=”false” fixed-aspect=”false” rot=”0″ height=”80″ width=”480″ y=”428″ x=”290.5″ libraryid=”com.gliffy.basic” shp_id=”5″ class=”round_rect”><text><![CDATA[<P ALIGN=”CENTER”><FONT FACE=”Arial” SIZE=”12″ COLOR=”#000000″ LETTERSPACING=”0″ KERNING=”0″><B>OSGi plugins</B></FONT></P><P ALIGN=”CENTER”><FONT FACE=”Arial” SIZE=”12″ COLOR=”#000000″ LETTERSPACING=”0″ KERNING=”0″><B>(v2)</B></FONT></P>]]></text><connlines/></object><object order=”3″ dshad=”false” gradon=”true” linew=”2″ linec=”3355443″ fill=”16763904″ text-horizontal-pos=”center” text-vertical-pos=”middle” lock=”false” fixed-aspect=”false” rot=”0″ height=”80″ width=”145″ y=”240″ x=”122.5″ libraryid=”com.gliffy.basic” shp_id=”6″ class=”round_rect”><text><![CDATA[<P ALIGN=”CENTER”><FONT FACE=”Arial” SIZE=”12″ COLOR=”#000000″ LETTERSPACING=”0″ KERNING=”0″><B>Atlassian REST Plugin Module</B></FONT></P>]]></text><connlines/></object><object order=”4″ dshad=”false” gradon=”true” linew=”2″ linec=”3355443″ fill=”16763904″ text-horizontal-pos=”center” text-vertical-pos=”middle” lock=”false” fixed-aspect=”false” rot=”0″ height=”80″ width=”145″ y=”140″ x=”123″ libraryid=”com.gliffy.basic” shp_id=”7″ class=”round_rect”><text><![CDATA[<P ALIGN=”CENTER”><FONT FACE=”Arial” SIZE=”12″ COLOR=”#000000″ LETTERSPACING=”0″ KERNING=”0″><B>Shared Access Layer (SAL)</B></FONT></P>]]></text><connlines/></object><object order=”5″ dshad=”false” gradon=”true” linew=”2″ linec=”3355443″ fill=”16763904″ text-horizontal-pos=”center” text-vertical-pos=”middle” lock=”false” fixed-aspect=”false” rot=”0″ height=”80″ width=”145″ y=”140″ x=”288″ libraryid=”com.gliffy.basic” shp_id=”8″ class=”round_rect”><text><![CDATA[<P ALIGN=”CENTER”><FONT FACE=”Arial” SIZE=”12″ COLOR=”#000000″ LETTERSPACING=”0″ KERNING=”0″><B>Atlassian User Interface (AUI)</B></FONT></P>]]></text><connlines/></object><object order=”6″ dshad=”false” gradon=”true” linew=”2″ linec=”3355443″ fill=”26112″ text-horizontal-pos=”center” text-vertical-pos=”middle” lock=”false” fixed-aspect=”false” rot=”0″ height=”65″ width=”105″ y=”333″ x=”103″ libraryid=”com.gliffy.basic” shp_id=”9″ class=”round_rect”><text><![CDATA[<P ALIGN=”CENTER”><FONT FACE=”Arial” SIZE=”12″ COLOR=”#000000″ LETTERSPACING=”0″ KERNING=”0″><B>Unified Plugin Manager (UPM) </B>to be included soon</FONT></P>]]></text><connlines/></object><object order=”7″ dshad=”false” gradon=”false” linew=”1″ linec=”0″ fill=”16777215″ text-horizontal-pos=”center” text-vertical-pos=”middle” lock=”false” fixed-aspect=”false” rot=”0″ height=”29″ width=”615″ y=”63″ x=”355″ libraryid=”” shp_id=”20″ class=”text_shape”><text><![CDATA[<P ALIGN=”LEFT”><FONT FACE=”Arial” SIZE=”18″ COLOR=”#000000″ LETTERSPACING=”0″ KERNING=”0″><B>Components of the Atlassian Plugin Development Platform</B></FONT></P>]]></text><connlines/></object><object order=”8″ dshad=”false” gradon=”true” linew=”2″ linec=”3355443″ fill=”16763904″ text-horizontal-pos=”center” text-vertical-pos=”middle” lock=”false” fixed-aspect=”false” rot=”0″ height=”80″ width=”145″ y=”240″ x=”288″ libraryid=”com.gliffy.basic” shp_id=”31″ class=”round_rect”><text><![CDATA[<P ALIGN=”CENTER”><FONT FACE=”Arial” SIZE=”12″ COLOR=”#000000″ LETTERSPACING=”0″ KERNING=”0″><B>Atlassian Template Renderer</B></FONT></P>]]></text><connlines/></object><object order=”9″ dshad=”false” gradon=”true” linew=”2″ linec=”3355443″ fill=”26112″ text-horizontal-pos=”center” text-vertical-pos=”middle” lock=”false” fixed-aspect=”false” rot=”0″ height=”65″ width=”105″ y=”333″ x=”230″ libraryid=”com.gliffy.basic” shp_id=”43″ class=”round_rect”><text><![CDATA[<P ALIGN=”CENTER”><FONT FACE=”Arial” SIZE=”12″ COLOR=”#000000″ LETTERSPACING=”0″ KERNING=”0″><B>Unified Application Links (UAL) </B>to be included soon</FONT></P>]]></text><connlines/></object><object order=”10″ dshad=”false” gradon=”true” linew=”2″ linec=”3355443″ fill=”26112″ text-horizontal-pos=”center” text-vertical-pos=”middle” lock=”false” fixed-aspect=”false” rot=”0″ height=”65″ width=”105″ y=”333″ x=”352″ libraryid=”com.gliffy.basic” shp_id=”44″ class=”round_rect”><text><![CDATA[<P ALIGN=”CENTER”><FONT FACE=”Arial” SIZE=”12″ COLOR=”#000000″ LETTERSPACING=”0″ KERNING=”0″><B>OAuth </B>to be included soon</FONT></P>]]></text><connlines/></object><object order=”11″ dshad=”false” gradon=”true” linew=”2″ linec=”3355443″ fill=”26112″ text-horizontal-pos=”center” text-vertical-pos=”middle” lock=”false” fixed-aspect=”false” rot=”0″ height=”65″ width=”105″ y=”333″ x=”476″ libraryid=”com.gliffy.basic” shp_id=”45″ class=”round_rect”><text><![CDATA[<P ALIGN=”CENTER”><FONT FACE=”Arial” SIZE=”12″ COLOR=”#000000″ LETTERSPACING=”0″ KERNING=”0″><B>Atlassian Gadgets </B>to be included  soon</FONT></P>]]></text><connlines/></object></objects></pageObj></stage>

About Sarah Maddox

Technical writer, author and blogger in Sydney

Posted on 9 October 2010, in Confluence, technical writing, wiki and tagged , , , , , , . Bookmark the permalink. 6 Comments.

  1. This post was very helpful for me today! Thank you!!

  2. Hi Sarah – Just to let you know that I followed your instructions and it worked. Hurrah! Thanks for your awesome blog!

    • Hallo mumpy
      I’m so glad it helped. Thanks for letting me know! You made my day.🙂
      Cheers, Sarah

      • Sarah, I actually had this bookmarked since I had struggled this early on in using Gliffy. My company has actually switched to Lucidchart’s Confluence plugin. Have you tried it? It’s pretty spectacular in a lot of ways that Gliffy was not able to match, like Visio import/export, real-time collaboration, and you can use the same account across Confluence and JIRA. This comparison of Lucidchart and Gliffy may be interesting if you’ve ever considered alternatives.

      • Hallo LuAnn
        Thanks for the information! I’ve seen Lucidchart, but never used it myself. It looks very cool. One question I have is whether people can use Lucidchart if their Confluence/JIRA site is behind a firewall and has no Internet access. Do you know the answer?
        Cheers, Sarah

  3. Awesome! This should really be a built in feature — we’re constantly creating mock-ups of the same thing and it’s very common to copy the same diagram and make modifications to it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: