Import compounds/materials

It is possible to import components directly to the components database from a CSV file, that is a standard approach for interchanging data between systems. The import/export functions are located on the components database:

In order to use the import function the input file must follow some rules as the import data must match what is expected to be received.

Example of a valid CSV to import:

BrandName,BrandDescription,UserDesignation,BrandDesignation,Type,SubTypeID,inside,outside,insideUseful,outsideUseful,length,price,usefulLength,reference,profit,polygonFaces,stockQuantity,stockDesired,stockAutomatic
"FastSeal","","POM","POM","Plastic","1","18","155","20","150","155","100","140","20.150.155","50","0","0.925357142857143","1","1"
"FastSeal","","POM","POM","Plastic","1","25","207.9","30","180","155","100","140","30.180.155","50","6","1","1","1"
"FastSeal","","EPDM 85ShA","EPDM 85ShA","Rubber","5","3","155","5","150","155","100","140","5.150.155","50","0","0.905028571428571","3","1"
"FastXRing","FastXRing - sub company of FastSeal","LPU","LPU","PU","4","36","63","37","62","155","24","140","37.62.155","20","0","40","5","0"

The columns description are:

nColumnDescription
1BrandNameBrand name, for example “FastSeal” – affects the brand table
2BrandDescriptionBrand description, for example “Good brand” – affects the brand table. If more than one description is set for the same brand, only the first occurrence will be taken in account.
3UserDesignationUser designation of a product, for example “HPU Red Premium”. Should correspond to the name that the product is known on your company – affects the products table
4BrandDesignationBrand designation, for example “HPU Red | FDA”. Should correspond to the name that your supplier calls to this product – affects the products table
5TypeMust be one of the following words: PU, RUBBER, PTFE, PLASTIC or METAL- affects the products table
6SubTypeIDThe sub type ID that matches the ID present on the material types window Compounds database – subtypes. If the sub type does not exist it will not be set (will remain without a subproduct)
7insideTube measured inside dimension (mm). Must be equal or smaller than inside useful – affects Materials table
8outsideTube measured outside dimension (mm). Must be equal or greater than outside useful – affects Materials table
9inside usefulTube inside useful dimension (mm) normally matches the sticker on the tube – affects Materials table
10outside usefulTube outside useful dimension (mm) normally matches the sticker on the tube – affects Materials table
11lengthTube length (mm) – affects Materials table
12priceCost of tube in local currency – affects Materials table
13useful lengthTube useful length (mm). Must be smaller than the tube length – affects Materials table
14referenceRaw material reference (normally describes the useful dimensions) – affects Materials table
15profitRequired profit in % (50 means 50%) – affects Materials table
16polygonFacesNumber of faces. 0 for rods and tubes, 4 for squares, 6 for hexagons and 8 for octagonal shapes – affects Materials table
17stockQuantityNumeric value that reflects the quantity in stock (integer or decimals numbers are possible). For example 1.2; 0.3; 0.33332; 4 are all valid numbers – affects Materials table
18stockDesiredInteger value that represents the number of tools that is the desired stock – affects Materials table
19stockAutomaticThis column can only have the value 0 or 1. Set to 1 if the software will manage this stock quantity or set to 0 if no change on the stock will be made by the software

Rules:

  • All values must be contained in ” “
  • No value can contain a “
  • The type (column 5) must be either PU, RUBBER, PLASTIC, PTFE or METAL
  • The column reference is generally the result of the “insideUseful”.”outsideUseful”.”length” columns. See example of the valid CSV file.
  • Numeric values uses the dot to separate the decimals. Ex: 345.87 – not commas!

The user can also create, manually, a few materials and export the file. This way a valid file is generated that can be used to import and also serves as a guide/example to create a larger file.

Import dialog

Version higher than 5.2.8.2 have a new and improved import dialog that gives more insight about the import and useful options. The dialog can provide some insight about the contents of the file being imported.

Two main options exist after the file is loaded:

  • Read file to replace: This option will check all current brands, products and materials that are currently on the database and will remove all that are not being in use before adding the new products and brands from the database.
  • Read file to add: This option will just add new brands, products and materials from the imported file.

In this example, the user is using a database with 76 brands, 30066 products and 31076 materials. This is clearly a wrong constructed database.

Using the option “Read file to replace”, where 3 brands, 2 products and 152 materials are new in relation to the current database, and where 71 brands, 30054 products and 30685 materiais are not being used, will result on a clean database with just 8 brands, 14 products and 543 materials. trying to import 30535 materials, 66 brands and 29518 products.

If the client used the option to add instead of replace, the result would be 76+3 brands, 30066+2 products and 31076+152 materials.

Leave a comment