Kitchen Pages, computer software
Go Back | KitCAD 2 Help Index

Help and Information about the Rule.exe program.

Formula or Rules for ObjectsRule.exe 1.12, 1.10, 1.0.

Rule.exe can be started from the Start Menu in Windows | Programs | Kitchen | Rule Manager Application. There are no configuration files. The Rule.exe program processes scripts found with KPD and DAT files for KitCAD. The Rules are made for Ruler.exe and are stored in the KPR file types. The Formula or Settings for the KPR file are kept in KPI (KPD) files.

A Backup Batch Utility is provided on the Server and recomended for users who edit or create their own rules for ruler. -

Please see Help Tab in the Rule.exe Application for a Updated Copy of Text Below.
An Example File is Included with the 19.2cb+++ update. bc2di.kpi, bc2di.kpr, bc2di.dbf, bc2di.kpd, and bc2di.dat

Rule.exe can also create .dat .kpd .kpr .kpi if requested. If any files are missing they are replaced. The DBF file is not replaced as it has to be generated by a database connection like that found in the main KitCAD programs. Rule.exe conforms to the win32 ini file standard and helps the user convert files into the KPR extension for KPD objects. The ; symbol tells the win32 ini program that the text after is for comments.

A KPI is a standard ini file. KPD is modified, and has a header. KPR files are the same format as the KPI ini files but must have ; after each line.
A KPI is the file which remembers settings in the KPR file. DAT or KPD is the KitCAD file. KPR is the same format as KPI but must have ; after each line. The default files are created without the ; symbol.

KPi = Formula or Settings for Ruler files created by Rule.exe (Right Coloum, formula or value. should have ; at end of line).
KPr = Ruler.exe files for dynamic size of objects
KPd = A users KitCAD drawing file type (Left Coloum, Value that KitCAD currently uses, must be of the correct type, use numbers if not sure).
DAT = KitCAD object or KPd renamed, selected from the drop down menu in KitCAD

The KPD file is opened on the Left Size while the KPI file is opened on the Right (formula) Side.
A user changes the formula stored in the KPI file to generate a KPR file based on the KPI and KPD files. The KPI File is saved for later use with the script is run.
A copy of the result KPD file is stored as a DAT file also.
This provides a layer of secuitry between changes to objects and the actual construction but still allows changes to the sizes of the objects.
The KPR file is used by Ruler.exe along with the DAT file to allow a user to have dynamic sized objects in both KitCAD programs (not fully tested in 1.19.2b).

NOTICE - Rule is only a tool to aid in file creation.

Rule.exe Rules System Creator. KitCAD 1.18 and KitCAD 2
For Ruler.exe Rules System 2.21 for KitCAD 1.19 and KitCAD 2
written by Jason Robinson (C) 2003

comments lines using the # symbol, end of line is the ; symbol.
Arrange rules so items are worked out as required
eg.. benchtop first because other items need information from it.
width, depth, height are from the Ruler while RealHeight, etc are from KitCAD
Example is from Object rule of bc2di.kpd and the file is BC2DI.KPD

End Of Line is the symbol ";" This symbol must be present in all values entered!

Syntax is :-



For the following as seen above there are 13 conversion types, this example is Width:
Width will be converted using the Scale loaded from each section.

=[width]; will default to write only one value, that of RealWidth.

=[width]==0; will allow Ruler.exe to write only one value, that of Width.

=[width]=*0; will allow Ruler.exe to write two values, Width and RealWidth.

=[width]*value; will allow Ruler.exe to write one Value, Width under BOTH!!!

=[width]*=value; will allow Ruler.exe to write one Value, Width under Width

=[0]%*value; Width under Width, but will use last value in program. for gaps.


PreSet Names that Ruler.exe has rules for:

RealWidth = Width
RealDepth = Depth
RealHeight = Height
RealHeightFrom = HeightFrom
RealPosX = Left
RealPosY = Top
FixY = FixY
FixX = FixX

PreSet Rules are:

[0] = 0
w = 1000
d = 600
h = 900
width =x w
depth =x d
height =x h
cwidth x= (((width) * 6) / AScale) / 3)
cdepth x= (((depth) * 6) / AScale) / 3)
cheight x= (((height) * 6) / AScale) / 3)
[0]%[+|-|/|*] = {Value}
0 == {Value}


Info for Cnc Converters - CutUp.exe (beta 2.20b - tests)

Replace Text = with
[POS] = Line Number of Cnc Item
[COUNT] = Count of Cnc Items
[MATERIAL] = Material Description
[CODE] = Material Code, match in your database!
[WIDTH] = RealWidth
[DEPTH] = RealDepth
[HEIGHT] = RealHeight
[NAME] = Part Name

Updated 24/5May/2003

©Copyright 1999-2005, all rights reserved.

Updated on the 02nd of October, 2005.

Valid HTML 4.01 Transitional