Material Control File F.A.Q.



The Material Control File seems complicated and requires on going maintenance. Is this true?

If you are familiar with programming the MC files then it's no big deal. If you are a new user and have little or no programming experience then yes it can be a little intimidating at first but if you take the time to learn how the MC files work and spend the time to practice you will begin to understand the power behind this file and that it is not difficult to understand.

As for on going maintenance, you need to remember that the power of the Design Tools program is the ability to generate the products you want. Each customer will have a different way of determining what options to ask, how to calculate the quantity of materials and what products are to be carried.

Once you know how to use the MC files and have programmed it to your specifications you will only need to make minor changes to it if modifying your options, adding or removing products or if you have a new version of the program which has new variables available to the MC file which you would need to add. Naturally there are some customers who would rather have us program their MC files which we will do for a fee.

Contact The Luxwood Corporation in regards to this option.

I get errors like the following when I run Review Materials: "No 2X6 RED CEDAR lumber in 16.12500 foot lengths - GIRT", "No SKU for component [3040DH] -1 requested", "Line 801: Undefined variable: ttl_8_bolt" or "Line 281 Encountered c when expecting {".

The first 2 errors indicate that the program could NOT generate the necessary materials. In the 1st example the program could not find any 2x6 x 16' pieces of Red Cedar Lumber. This error would occur if there was no Lumber SKU which matches the Wood Type and Dimensions. The 2nd error message indicates that the program could not generate a 3040DH (door). There could be a couple of reasons for this, either the component does not exist in the Component SKU list or it has been spelled incorrectly in the MC file. When a component is entered into the MC File it must match exactly the component name in the Component SKU list. Either of these errors is not critical, it does not stop the program from running. It is just reporting that these materials could not be found and will not be put onto the Bill of Materials.

The next error indicates that there is a variable in the MC file which has not been initialized (has had a value set to it). Since this variable has not had a default value set to it when it came upon the variable for the 1st time at line 801 it has no idea what it is therefore cannot go any further in the program. When you encounter this error message the MC file will not continue it's processing until this problem is fixed. Clicking on OK / Cancel will bring up another message asking you if you want to edit the MC file in order to fix the problem. This error can be easily fixed by assigning a value to the variable. This is usually done in the initial section. If the variable is adding quantities you would normally set it to 0, however, not all variables should be set to 0, it all depends on what you want the default for that variable to be. Take a look at an existing MC file to see how the different variables have been set and what they are used for. It should give you a better idea of how to set your own variables.

The last error example is a more serious problem. This indicates that there is a syntax error somewhere in the MC file and it is not necessarily on the line indicated in the error message. This error could be caused by an incorrect line which could be 2, 10, 20 lines above the indicated error line or it could be a bracket is missing or a statement has been entered incorrectly. When you encounter this error message the MC file will not continue until this problem is fixed. Clicking on OK / Cancel will bring up another message asking you if you want to edit the MC file in order to fix the problem. Since this is a syntax error there is no quick and easy way to find the problem. You have to go through each line starting at the error line indicated and working your way back. Sometimes the error is easy to find, other times it seems almost impossible to find. If it takes to long and the problem does not go away it is better to dump this MC file and use a backup copy. This is why we emphasize making backups of your MC files. If you are new to programming the MC file a suggestion would be to make only small changes at one time then Save and test it to make sure everything works before moving on. This way you have a better chance of finding the problem should you encounter one.