Moscow State University

Phone: +7 095 939-5906

Fax: +7 095 932-8815

octonus@next.msu.ru

Diamond calculator : Documentation
 

How to modify price list?

This document instructs on modifying price lists supplied with DiamCalc

DiamCalc has its price lists stored in a text format, allowing to examine or modify price lists with any text editor. The file names shipped with DiamCalc are Price.txt (located in the folder where DiamCalc is installed), OctBrill.txt and OctPear.txt (located in System subfolder of the folder where DiamCalc is installed).

Before examining or especially editing price lists data you need to study "Price.txt file format" and "System\OctBrill.txt file format" thoroughly. The best is to keep a printed copy of those documents with you while working with Price.txt or System\Brill.txt files.

For a less technical description of methods that used in DiamCalc to calculate price of diamonds, see "How DiamCalc calculates diamond price".

Please keep in mind that an incorrect modification of price list files may make pricing not work. Please make a backup copy of Price.txt, OctBrill.txt and OctPear.txt files before changing them. Having it will help to restore a working configuration if something goes wrong. It is especially important if you made some modifications of those files before, so there is a risk that your previous work can be lost.

The following examples will show how to modify price lists. The examples can be used as a guideline for similar changes in the price lists.

 
     
 

1. Modifying price values for a specific cut, mass range, color and clarity

Example: setting the price of Brilliant cut diamonds of 0.08-0.14 carat, I, SI3 to 425 US dollars per carat.

The price lists for Brilliant cut is stored in System\OctBrill.txt file (the reference to it is in Price.txt file). Therefore, it is necessary to modify System\OctBrill.txt file only. If we would like to change Pear cut data, we would modify System\OctPear.txt file; for other cuts, the price is calculated as a discounted price of similar Brilliant cut diamonds.

The step-by-step instructions are given below:

a) Open System\OctBrill.txt file with a text editor of your choice (e.g. Notepad).

b) Find a price table for the chosen mass range (the file contains several tables for different mass ranges). In our case, look for the string

Mass: 0.08 0.14

(Note that the other lines describing the table are "Format: clarity 8 5", which sets the dimension of the table to 8 rows, 5 columns, and "Magnify: 1", which means that all values in the table should be multiplied by 1, i.e. left the same.) The table we are looking for is below. Its rows and columns have captions to find necessary combinations of color and clarity.

c) Find a number for the chosen color and clarity values. In our case, find a number that is in "I-J" row and "SI3" column. It is 420. Change it to 425.

d) The next time DiamCalc is started, it will value Brilliant diamonds with parameters 0.08-0.14 carat, I, SI3 at 425 US dollars per carat.

Note: a discount for cut quality will probably be applied also, which will made the price somewhat different.

Top of this page

 
     
 

2. Setting a different discount for fancy cuts

Example: setting the price of fancy cut diamonds to 60% of Brilliant cut diamonds with the same mass, color and clarity.

The price of fancy cut diamonds except Pear are defined in Price.txt file as having 50% of the price of Brilliant cut diamond with similar parameters. To change this number to 60% of the Brilliant, it is enough to modify Price.txt file only.

a) Open Price.txt file with a text editor of your choice (e.g. Notepad).

b) Find the following line in the file:

Cut: Other

It refers to the cuts that were not specifically processed, i.e. for all cuts except Brilliant and Pear. After this line, other parameters follow.

Source: cut= Brilliant

means that the base price is taken from Brilliant price lists (System\OctBrill.txt), and "Magnify: 0.5" sets the price to be 50% of the base price.

c) Change "Magnify: 0.5" to "Magnify: 0.6" (i.e. to 60%).

d) The next time DiamCalc is started, the price for all cuts except Brilliant and Pear will be 60% of Brilliant.

Top of this page

 
     
 

3. Defining a custom discount for a specific cut except Brilliant and Pear

Example: setting Marquise price to 55% of Brilliant with the same mass, color, and clarity, leaving prices for all other cuts unchanged.

This example is similar to the previous one, but it shows how to define price of different cuts more precisely. We will modify Price.txt file in a way that will give different prices for Brilliant (separate price list), Pear (separate price list), Marquise (55% of Brilliant), and all other cuts (50% of Brilliant in the original file version). You can extend this approach for other cuts, so that each one can have its own discount relative to Brilliant or Pear.

Possible cuts names are Brilliant, Pear, Heart, Oval, Marquise, Prince, Emerald, Radiant.

a) Open Price.txt file with a text editor of your choice (e.g. Notepad).

b) Find line

Cut: Other

Make a copy of it along with the following lines

Magnify ...
Discount ...
Source ...

DiscountPerFluorescence ...

and place the copy after the original lines, adding a blank line to divide cut types. You can use "Copy" and "Paste" commands in your editor to make a copy.

c) Change "Other" in the copied lines by "Marquise" and "0.5" magnify coefficient by "0.55" (it means 55%). So, we appended the following lines to the file:

Cut: Marquise
Magnify: 0.55
DiscountPerCut: N/A
Source: cut= Brilliant

DiscountPerFluorescence: N/A

d) IMPORTANT! Find line

PriceList: 3

It sets the number of cut types processed separately (Brilliant, Pear and Other cut types are supported initially). As we add a new type, we should change this to

PriceList: 4

e) The next time we start DiamCalc, Marquise cut will be priced at 55% of similar Brilliant diamonds.