![]() |
How to integrate Icons in Creo Elements/Direct 3D Library 8.0 and earlier Versions
All icons used in 3D Library are organized in different categories. These categories are reflected in the directory structure on harddisk and also in the user interface. The file format of the icon file can be every type which is supported by Creo Elements/Direct Modeling Integration-Kit Function sd-create-image (see online documentation, integration kit). Icons shipped on the 3D Library catalog CD are saved in XBM format.
The icon categories are:
- MAIN
- The highest level in 3D Libray part structure
- EZT
- The second level in 3D Libray part structure
- PART
- The third level in 3D Libray part structure. These level specifies a standard part as known by the DIN / ISO / AMSE organizations
- VIEW 1)
- The view category was used to have a represantaion how the part looks in 2D standard view of a drawing
- SML
- This category shows specific parameter of the selected standard part
REMARK:
1) The icons of the VIEW category are not required since Version SD8.x. For compatibility reason they were still included
in the catalog CD of SolidDesigner 8.0.
We will start now with an overview having a look to the user interface, the icons used there and where they are located. Then we will have a closer look to an icon index file and finally do a step by step integration of some new icons
The 3D Library is using INDEX files to get the right icon to be displayed.
Icon index files are located in the .../slcatalog/icon directory and one in the .../SolidLib/icon directory. Icon index files are simple ascii files and can be edited with every text editor saving plain text files. Each line in the index files treats one icon. There in is listed the purpose where to use this icon, a string which makes the connection to the EZT.TAB (see online documentation) and finally the filename inclusive a path relative to the .../slcatalog/icon directroy.
part@D00964@part/D00964.001@0
| | | |___________filename = classcode(DOT)number
| | | with number 001: used for purpose PART
| | | with number 002,003 used for purpose VIEW
| | | with number 004,nnn used for purpose SML
| | |__________________subdir
| |________________________string to recognize / classcode
|______________________________purpose

![]() ![]() ![]() ![]() ![]() ![]() |
Finally you should have the following pixmap files in/below the icon dir
5108 Aug 18 1998 MAIN/din_main.13
5108 Aug 18 1998 EZT/din_ezt.110
5028 Apr 3 08:00 PART/DIN00964.001
5108 Aug 18 1998 SML/DIN00964.004
5108 Aug 18 1998 SML/DIN00964.005
5108 Aug 18 1998 SML/DIN00964.006
5108 Aug 18 1998 SML/DIN00964.007
5108 Aug 18 1998 SML/DIN00964.008
5108 Aug 18 1998 SML/DIN00964.009
5108 Aug 18 1998 SML/DIN00964.010
5108 Aug 18 1998 SML/DIN00964.011
5108 Aug 18 1998 VIEW/DIN00964.002
5108 Aug 18 1998 VIEW/DIN00964.003
The icons look like
MAIN/din_main.13 EZT/din_ezt.110 PART/D00964.001 |
PART/D00964.004 PART/D00964.005 PART/D00964.006 PART/D00964.007 |
PART/D00964.008 PART/D00964.009 PART/D00964.010 PART/D00964.011 |
REMARK:
Of course, you can also use your favorite grafik tool to create icons from scratch or to modify them.
Take an existing IDX file as a template and edit that one or use one of the tools below.
e.g.: .../sldiniso_eng/slcatalog/icon/DIN00964.IDX
Content:
PART@D00964@PART/D00964.001@0 SML@D00964@SML/D00964.004@0 SML@D00964@SML/D00964.005@0 SML@D00964@SML/D00964.006@0 SML@D00964@SML/D00964.007@0 SML@D00964@SML/D00964.008@0 SML@D00964@SML/D00964.009@0 SML@D00964@SML/D00964.010@0 SML@D00964@SML/D00964.011@0 VIEW@D00964@VIEW/D00964.002@4@ans@2@anv@1@ebz@1@dsg@S VIEW@D00964@VIEW/D00964.003@4@ans@4@anv@1@ebz@1@dsg@S
MAIN@Bolt/Screw@MAIN/din_main.13@0 EZT@Cheese Hd Screw@EZT/din_ezt.110@0to your MAIN_EZT.IDX file. The string between the first and the second "@" has to refer to the string defined for level 1 and 2 in the administration area of 3D Library's user interface.
-rw-r--r-- 1 bin bin 94 Apr 3 08:00 ./SolidLib/icon/MAIN_EZT.IDX
REMARK:
There is a second one with the same filename which is only used during the catalog installation by the installation
scripts.
-rw-r--r-- 1 bin bin 94 Apr 3 08:00 ./slcatalog/icon/MAIN_EZT.IDX
Do not edit this one.
If you locate and name your icon files as shown above you can use the following scripts to generate the icon index file
| for HP UX systems, save as makeicon |
#!/bin/ksh
# -*-awk-*- force emacs to awk mode
# ###############################################################################
#
# Parametric Technology GmbH Confidential
#
# Description: script to generate an icon index file
# Author: Wolfgang Traetner
# Created: Wed Sep 13 07:27:06 2000
# Modified:
# Language: ksh
#
# (C) Copyright 2000 Parametric Technology GmbH, all rights reserved.
#
###############################################################################
# script to generate an icon index file
# 1) store and name your icon files as described in sl_icon_create.html
# 2) change directory to {catalogdir}/slcatalog/icon
# 3) call script with
# makeicon {classcode}
#
# result is written to {classcode}.IDX
#
# filename = classcode(DOT)number
# with number 001: used for purpose PART
# with number 002,003 used for purpose VIEW
# with number 004,nnn used for purpose SML
if [ "${1}" != "" ]
then
cd PART
for file in ${1}.001 ; do echo PART@${1}@PART/${file}@0>/tmp/_temp_.IDX ; done
cd ..
cd SML
for file in ${1}.0?? ; do echo SML@${1}@SML/${file}@0>>/tmp/_temp_.IDX ; done
cd ..
cd VIEW
for file in ${1}.002 ; do echo VIEW@${1}@VIEW/${file}@4@ans@2@anv@1@ebz@1@dsg@S>>/tmp/_temp_.IDX ; done
for file in ${1}.003 ; do echo VIEW@${1}@VIEW/${file}@4@ans@4@anv@1@ebz@1@dsg@S>>/tmp/_temp_.IDX ; done
cd ..
cat /tmp/_temp_.IDX |sort >${1}.IDX
rm /tmp/_temp_.IDX
echo ""
ls -oaL ${1}.IDX
else
echo ======================================
echo .
echo call this script with ${0} classcode
echo .
echo where classcode is e.g. D00076-1
echo .
fi
|
| for NT systems, save as makeicon.bat |
@echo off
rem ###############################################################################
rem
rem Parametric Technology GmbH Confidential
rem
rem Description: script to generate an icon index file
rem Author: Wolfgang Traetner
rem Created: Wed Sep 13 07:27:06 2000
rem Modified:
rem Language: DOS Batch
rem Package: docu
rem
rem (C) Copyright 2000 Parametric Technology GmbH, all rights reserved.
rem
rem##############################################################################
rem script to generate an icon index file
rem 1) store and name your icon files as described in sl_icon_create.html
rem 2) change directory to {catalogdir}/slcatalog/icon
rem 3) call script with
rem makeicon {classcode}
rem
rem result is written to {classcode}.IDX
rem
rem filename = classcode(DOT)number
rem with number 001: used for purpose PART
rem with number 002,003 used for purpose VIEW
rem with number 004,nnn used for purpose SML
if "%1"=="" goto error
cd PART
for %%A in (%1.001) do echo PART@%1@PART/%%A@0>..\_temp_.IDX
cd ..
cd SML
for %%A in (%1.0??) do echo SML@%1@SML/%%A@0>>..\_temp_.IDX
cd ..
cd VIEW
for %%A in (%1.002) do echo VIEW@%1@VIEW/%%A@4@ans@2@anv@1@ebz@1@dsg@S>>..\_temp_.IDX
for %%A in (%1.003) do echo VIEW@%1@VIEW/%%A@4@ans@4@anv@1@ebz@1@dsg@S>>..\_temp_.IDX
cd ..
type _temp_.IDX |sort >%1.IDX
del _temp_.IDX
dir %1.IDX
goto end
:error
echo ======================================
echo .
echo call this script with %0 classcode
echo .
echo where classcode is e.g. D00076-1
echo .
:end
|
These tools have the status of a goodie (see <install-dir>/documentation/goodies/Readme.html)
![]() |