D3PLOT 22.1

Template File

Template File

D3PLOT 10.0 onwards supports a new Template file that can control which windows models are located in and settings for model offsets, colours and initial plotting modes. The contents of the Template file can be applied automatically as models are read in.

All of the options that can be specified in the Edit Window menu (see EDIT WINDOW Changing "Model in Window" attributes ) can be set and applied automatically using the template file.

Template File Format

The Template file is a simple ASCII file that controls the position, plotting mode and colour of models with windows. Each line of the template file contains information for a single model/window combination and has the following format.

#
Window=1 model=1 offset=model x=100 y=0 z=0 mode=shaded colour=red
Window=1 model=2 offset=model x=200 y=0 z=0 mode=shaded colour=green
Window=2 model=1 offset=model x=100 y=0 z=0 mode=shaded colour=blue

#

Keyword Description Options
Window Specifies the window number 1-32
model Specifies the model number 1-32
offset

Offset system.

Model - shifts the model in it's own space system
Screen - shifts the model in the plane of the screen.

MODEL
SCREEN
OFF
DEFAULT (=MODEL)

x/y/z

Offsets to apply in X,Y and Z directions. By default these are defined in model units. Instead of using model units a %age of the model bounding box can be specified by adding a % to the end of the string

x=100 : offset x by 100 model units
x=50% : offset x by 50% of the model X dimensions,

colour Specify the colour used to display the model. The default option is PART which means that each model is drawn using D3PLOTs normal part colouring scheme where each is drawn in a different colour. Setting this option to a specific colour forces all the parts in the model to be drawn using the specified colour. A user defined colour can also be specified by setting the colour to 0xRRGGBB where RR,GG and BB are the RED, GREEN, and BLUE colour components in the range 0-FF (0-255).

PART
RED
GREEN
BLUE
CYAN
MAGENTA
YELLOW
RED_MAGENTA
LIGHT_ORANGE
YELLOW_GREEN
GREEN_CYAN
CYAN_BLUE
DARK_ORANGE
LIGHT_BLUE
GREY
BLACK
WHITE
DEFAULT (=PART)

mode Specifies the default drawing mode for the model

SHADED
WIRE
HIDDEN
CURRENT
DEFAULT (=CURRENT)

Loading a Template File

If a template file is specified in the Open Model panel it's contents will be applied automatically as model are open and read into D3PLOT.

As well as applying template settings automatically as models are read in a template file can also be loaded at anytime via the WINDOW> popup menu. As the file is read the settings it contains are applied to any Window/model combinaitons taht match those defined in the file

Shortcut keys can also be assigned to read and apply template files (see Shortcut Keys for more details)

Saving a Template File

The current window and model layout information can be saved into a template file at anytime via the WINDOW> popup menu.

When a template file is saved any offsets that have been specified will be written out using the same format as the option in the Edit Window menu (see OFFSET... adding an artifical offset to models in windows for more details). If for example modle offsets are being displayed as %ages in the Edit Window menu then all the offsets will be converted to %ages before they are written to the templaet file.