Spec-Driven Piping in Creo Parametric allows users to model piping installations at a much faster and more accurate rate than using the conventional Piping module (for further details, see our earlier blog post Why Spec-Driven Piping?). One of the benefits of Spec-Driven Piping is that the appropriate fittings are selected automatically during insertion based on the specification and size of the pipeline. To make this selection process easy for the user, PTC has added a GUI for fitting insertion. Every fitting is associated with a fitting category, which is essentially just a label that helps categorize the fittings into convenient and logical groups. That fitting category is then associated with an icon in the desired piping project. The out-of-the-box GUI is shown below.
Highlighted in red above are the fitting category icons. The default PTC fitting categories are Valve, Flange, Elbow, Branch, Reducer, General, Assembly, and Support.
The Stated Rules
The rules for creating and managing these GUI icons are defined by PTC here. In the link, PTC states three requirements:
- The usable file extensions are either GIF or PCX
- The icon size must be 24 x 24 pixels
- The icon file library is located in <Creo installation path>/text/resource.
However, the documentation on the true requirements are unclear and inconsistent. From our own testing we’ve found the rules to be a little different.
The Actual Rules
1. Use GIFs to support images with color, along with transparency
PCX files are not recommended. Even creating them with Photoshop makes the icon look strange in the GUI. Below are side-by-side examples of a PCX (left) vs. a GIF (right) icon.
As you can see GIFs can additionally handle images with color while a PCX cannot. They can also show transparency.
2. To fit properly on the icon “row”, images should be 20 by 20 pixels
The eight out-of-the-box images from PTC are 20×20 pixels. Once the size gets larger than that, arrows show in the GUI indicating that the images are hanging off the viewing “row”. The comparison below shows the fitting GUI with one “extra” category using 22x22px (left) and 20x20px (right) icons; notice the arrows on the left but not the right.
Images can be larger than 24x24px but they won’t show well, the default height of the icon row is 20px. Even if this large icon is the only icon, Creo won’t automatically resize the GUI as demonstrated below.
As an additional note, the GUI does support multiple rows of icons. In other words, if there are more fitting categories/icons than would fit on one row, the GUI will automatically expand the extra icons onto additional rows. However, those icons on the additional rows may not be initially visible by default, and so the user will either need to use the arrow icons to span between the rows or manually expand the GUI to show the additional rows.
3. Save the fitting icon GIF file wherever you want, just be sure to include the full path to the image
To test this, we placed an image in the folder directly above the Creo installation path (i.e. – instead of using “<Creo installation path>/text/resource” as recommended by the documentation, we placed it at “<Creo installation path>/text/”). We also placed a copy of the image into a folder on our desktop to see if that location would work as well. In the picture below, the columns highlighted in yellow are our custom-made icons that show up in the bottom icon row.
As shown above, Creo will allow the use of full-path and relative paths! Also, for paths including environmental variables, be sure to use the linux variable “$<var>” instead of the windows “%<var>%”.
For best results, we recommend saving a GIF as a 20x20px. You can store these icon files wherever you like (such as a centralized server location), just be sure to include the full path to that image.