<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<!--
Copyright (c) 2006 UGS Corp.

All Rights Reserved.

This software and related documentation are proprietary to UGS Corp.
-->
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>Palette file format</title>
      <script language="javaScript">
        abridged="false";
        function pageLoader() {}
        displayConditions=new Array();
      </script>
      <link type="text/css" href="../css/main_styles.css" rel="stylesheet">
   </head>
   <body class="bodydocs" onload="top.pageLoader()" bgcolor="#FFFFFF">
      <div class="title_topic8" id="xps10_pagetitle">Palette file format</div>
      <hr noshade="true">
      <table cellspacing="4" align="center">
         <tr valign="top">
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1">
               <p class="para_td"><a class="links" href="javascript:void(0)" onclick="top.openFile('intro_to_nx/uiu_ab_pal_prt_ov.html');return(false);">Overview</a></p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1">
               <p class="para_td"><a class="links" href="javascript:void(0)" onclick="top.openFile('intro_to_nx/uiu_ab_pal_prt_p.html');return(false);">How To</a></p>
            </td>
            <td bgcolor="#f4f4f4" colspan="1" rowspan="1">
               <p class="para_td"><a class="links" href="javascript:void(0)" onclick="top.openFile('intro_to_nx/uiu_ab_pal_prt_rt.html');return(false);">Related Topics</a></p>
            </td>
         </tr>
      </table><br><p class="para_topic">A palette file is an XML file and is a member of the PLMXML family. A palette file has a .PAX extension and consists of a list of palette entries, each containing standard set of data that describes the entry and an area of application-specific XML.</p>
      <div class="title_division">Base</div>
      <p class="para_division">The base of the palette is a Palette XML node. The following shows an empty palette file: &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;Palette xmlns=&quot;http://www.ugsolutions.com/Schemas/2001/UGPalettes&quot; schemaVersion=&quot;1.0&quot;&gt; &lt;/Palette&gt; </p>
      <div class="title_division">Presentation section</div>
      <p class="para_division">The palette has a presentation section that controls the:</p>
      <ul>
         <li>
            <p class="para_item">Bbitmap that displays on the tab on the Resource Bar.</p>
         </li>
         <li>
            <p class="para_item">Window's title and the tool tip text.</p>
         </li>
         <li>
            <p class="para_item">Information link URI for the whole palette.</p>
         </li>
      </ul>
      <p class="para_division">Add this section as a child node of the Palette node. The following shows a sample Presentation section: &lt;Presentation name=&quot;Test Palette&quot; application=&quot;UG_APP_MODELING&quot; bitmap=&quot;c:\my_palette\question.bmp&quot;/&gt; </p>
      <p class="para_division">The application entry can be a space-separated list of NX applications. It can also be optionally omitted, in which case the palette appears everywhere.</p>
      <div class="title_division">Palette entry</div>
      <p class="para_division">You add a palette entry as the direct child of the Palette XML node. A palette entry consists of the following:</p>
      <ul>
         <li>
            <p class="para_item">A PaletteEntry node that contains a unique id for the current palette </p>
         </li>
         <li>
            <p class="para_item">A Presentation area that contains the name of the entry (required), an optional URI for more information, and an optional preview image </p>
         </li>
         <li>
            <p class="para_item">A References section that, in NX, can contain only one entry, which controls the kinds of objects that a user can pre-select when he or she drops the palette entry onto the Graphics Window. The system passes this object to the application when it is dropped onto the Graphics Window. If the user will not be preselecting an object before dragging and dropping, you should specify an empty References node: &lt;References/&gt; </p>
         </li>
         <li>
            <p class="para_item">An ObjectData node that specifies the entry class. In order to handle the specified entry class, someone must have registered it in NX. </p>
         </li>
      </ul>
      <p class="para_division">The following shows a palette entry: <code>&lt;PaletteEntry id=&quot;id3&quot;&gt;    &lt;Presentation name=&quot;Circular retaining pin&quot;                  informationURI=&quot;http:/standards/retaining.html&quot;&gt;      &lt;PreviewImage                    location=&quot;circlepin.gif&quot;/&gt;    &lt;/Presentation&gt;    &lt;References order=&quot;id1&quot;&gt;      &lt;GeometricReference id=&quot;id1&quot;                 name=&quot;Mate: Planar Face&rarr;Planar Face&quot;                 selection=&quot;PlanarFace&quot;/&gt;    &lt;/References&gt;    &lt;ObjectData class=&quot;Component&quot;&gt;            &lt;Filename&gt;11121x1a.prt&lt;/Filename&gt;    &lt;/ObjectData&gt;  &lt;/PaletteEntry&gt;</code></p>
      <div class="title_division">ObjectData entries</div>
      <p class="para_division">For a list of ObjectData types, see <a class="links" href="javascript:void(0)" onclick="top.openFile('intro_to_nx/uiu_ab_pal_prt_m_types_r.html');return(false);">Palette entry types</a>.
      </p>
      <p class="para_division">The following contains a list of additional tags that may be of interest.</p>
      <div class="title_division">TemplateFileType</div>
      <p class="para_division">TemplateFileType stands for non-master type in NX Manager, i.e. specification, manifestation, etc. The following entry shows its usage.</p>
      <p class="para_division">&lt;PaletteEntry&gt; &lt;References/&gt; &lt;Presentation name=&quot;A size, 2sheets&quot;&gt; &lt;PreviewImage type=&quot;UGPart&quot; location=&quot;dwg_a_format.prt&quot;/&gt; &lt;/Presentation&gt; &lt;ObjectData class=&quot;DrawingTemplate&quot;&gt; &lt;TemplateFileType&gt;none&lt;/TemplateFileType&gt; &lt;Filename&gt;dwg_a_format.prt&lt;/Filename&gt; &lt;/ObjectData&gt; &lt;/PaletteEntry&gt;</p>
      <div class="title_division">PreviewImage section</div>
      <p class="para_division">The &lt;PreviewImage&gt; specification can take any of the following forms:</p>
      <ul>
         <li>
            <p class="para_item">Use this form to extract the preview from the NX part file: <code>&lt;PreviewImage type=&quot;UGPart&quot; location=&quot;11121x1a.prt&quot;/&gt;</code></p>
         </li>
         <li>
            <p class="para_item">Use this simple form to display a web-friendly image (GIF, JPEG, or PNG): <code>&lt;PreviewImage location=&quot;xxx.gif&quot;/&gt;</code></p>
         </li>
         <li>
            <p class="para_item">Use this form to preview with legacy UDFs: <code>&lt;PreviewImage type=&quot;CGM&quot; location=&quot;hole.cgm&quot;/&gt;</code></p>
         </li>
      </ul>
   </body>
</html>