User-Defined Hatching (2-D)

2-D Part > Hatching > Define > User-defined hatching

You use this button in the part hatching mask to select your own hatchings. To create your own hatchings, you need to change SRAFUSR.MNU and create an EMF image as a preview.

  1. Call SRAFUSR.MNU in the HiCAD text editor or in another editor.

Example of SRAFUSR.MNU

Only change the values described below. The other rows contain fixed values which must not be changed.

SIZE COLS and SIZE ROWS define the size of the menu area in columns and rows. The default value is 2 columns for SIZE COLS and 1 row for SIZE ROWS.

  1. Change the first value for SIZE COLS (column) and SIZE ROWS (row).
  2. Now copy and change the following row in the MNU file:

NAME=SCHRAFBSP.EMF,HELP="Schraffurbeispiel",COMMAND="%ZSC1:=21,%ZSC2:=21;%ZSW1:=60;%ZSW2:=90;%ZSD1:=2;%ZSD2:=4,";

By changing the variables, you define your hatchings.

%ZSC1 and %ZSC2
Here, you enter the value for the first and second hatching code. The second code can be deactivated by means of 0. You will find the value and the definition of the hatching codes in SRAFFUR.DAT. Each hatching code is defined by means of the colour, line thickness and line type of the hatching lines.

%ZSW1 and %ZSW2
These variables specify the angle of the hatching.

%ZSD1 and %ZSD2
These variables enable you to define the spacing of the hatching for the first and second hatching code.

  1. Change the variables.
  2. Save the MNU file.

To create the graphic for the pop-up menu, you need to create an EMF file.

  1. To do this, create a rectangle as a new part in HiCAD.
  2. Activate the hatching mask: Select 2-D Part > Hatching > Define, then select the User-defined hatching option at the top right.
  3. Assign the new hatching to the rectangle.

Note that the field containing the new hatching does not yet have the correct graphic.

  1. Export the rectangle as a Windows metafile.
  2. Save the part (rectangle) in directory hicad/makro2d/image.
  3. Load SRAFUSR.MNU once again and, in the inserted row, replace SCHRAFBSP.EMF by the EMF file previously created in HiCAD.
  4. Save the MNU file.

The next time you call the hatching mask, you will find the newly defined hatching with graphic under the user hatchings.

Example of changes to SRAFUSR.MNU

Hatching (2-D)Part Hatching (2-D)

© Copyright 1994-2018, ISD Software und Systeme GmbH
Version 2302 - HiCAD 2-D
Date: 14/09/2018

> Feedback on this topic