Materials Management Tools

© 2001 Winston Mitchell

Document Contents

Professional v8 and later users: please read this article first

How the New Tools Work

Forward—
It is not the intent of this article to answer all questions about all scenarios involving the handling of materials in v7.1. Although the materials functions discussed here are not overly complex, the existence of multiple sources of materials and the user's ability to modify them and manipulate the numerous sources creates an array of possibilities beyond the scope of this document.

What follows is an attempt at describing in detail how TurboCAD v7.1 behaves in regards to the opening of files that contain materials and users' use of the materials editor and the new materials management functions. This article is based on the results of considerable testing and experimentation and represents my current understanding. If users discover discrepancies and report them on the v7.1 Materials System thread of the TurboCAD User Forum, this document will be updated.

Questions of the type "what happens if...", "how do I...", "what happened to...", etc. are the source of the FAQ that appears below the article. This FAQ will be expanded as I collect questions that seem likely to be of general interest.

The Role of the Propin.dat File—
TurboCAD reads this file once during a drawing session and re-writes the file whenever this working copy in memory changes. The reading of the file occurs the first time that an event creates the need for TurboCAD to have the information.

Events that create this need are any use of the materials editor, use of the "Load", "Restore", and "Save" functions, and opening files that contain materials.

If propin.dat does not exist, TurboCAD creates it as a copy of the Default.mat file.

All changes to materials are reflected in this file.

Propin.dat is always in complete agreement with the materials in all open drawing files.

Where, How, and When Materials are Stored—
Propin.dat:
The contents of this file (and the copy in memory) contain the current state of the materials system.
*.mat files:
The contents of propin.dat can be saved in Default.mat or a new .mat file of the user's choosing. When the user saves materials to an existing .mat file, the contents of the existing file are replaced with a copy of propin.dat.

Special note to users of Microsoft Access: the .mat extension may not be visible in the file name. Moreover, if it is not visible, you will not be able to change it. To view or edit these files you can put a shortcut to Wordpad or your favorite text editor in the "SendTo" folder and send the file to the application; or, you can add an "Open with <application>" command to the Windows Explorer local menu.

*.tcw files:
When a drawing file is saved, it is saved with a subset of propin.dat. This subset consists only of the materials needed to support the drawing.
How Propin.dat Is Altered—
Materials Editor:
Any changes, additions, or deletions made using the Materials Editor will be reflected in propin.dat.

Changes to a material that exists in one or more open drawings will be reflected in those open drawings that use that material.

Loading Materials:
Propin.dat is not over-written.

If the source file has materials that do not exist in Propin.dat, those materials are added to propin.dat.

If the source file has a material existing in propin.dat but with different settings, the differences are resolved with the "Confirm Material Replace" dialog.

Restoring Default Materials in v7:
Propin.dat is not over-written.

If Default.mat has materials that do not exist in propin.dat, those materials are added to propin.dat.

If the same material exists in both propin.dat and Default.mat, the settings for that material in Default.mat will replace the settings for that material in propin.dat.

Note: the author recommends that all users keep a copy of Default.mat in another directory for safekeeping and protection against accidental changes to the file.

Restoring Default Materials in v8:
Propin.dat is reset so that it contains only the materials in Default.mat.
Opening Drawing files:
If a drawing file is opened with a material that does not exist in propin.dat, that material is added to propin.dat.

If a drawing is opened with a material that exists in propin.dat but with different settings, the difference is resolved with the "Confirm Material Replace" dialog.

"Confirm Material Replace" Dialog—
This dialog appears whenever the program finds that it is necessary to resolve conflicts in materials settings. A conflict arises when a material is introduced that already exists in propin.dat but with different settings. This can happen when opening a file, restoring the default materials or loading material from a user's .mat file.

There are seven possible responses.

"Replace":
This response replaces the settings in Propin.dat with those of the material in question. Each material in question is resolved individually.
Replace All:
Same as "Replace" except that all materials with conflicts are handled at once.
"Skip":
The material in question is not altered in propin.dat. If the conflict arose from opening a drawing file, the settings for the material in the drawing revert to those already existing in propin.dat.
"Skip All", hitting the [Esc] key, and closing the dialog with no response:
Same as "Skip" except that all materials with conflicts are handled at once.
"Rename":
The material in question is added to propin.dat with a new name equal to the old name with the character string " (2)" appended to it. The new material is added to the same category as the old material. If the conflict arose from opening a drawing file, the settings for the material in the drawing revert to those already existing in propin.dat.

NOTE: this is probably a bug. When choosing this response, it is most likely that the user's intention is to add the material to Propin.dat while retaining it for use in the drawing. If this is the user's intent he can achieve it by assigning the renamed material to the object in the drawing with the Materials Editor. Also, note that typing in the "New Material Name" window is ignored.

Top of page

Implications for Upgraders

"Read-Only" Propin.dat—
Because their propin.dat files were exposed to unwanted changes when opening other users' files that contained edited standard materials or new materials, many users have protected themselves by marking their propin.dat files as "read-only". This provided them with the choice of whether or not to accept changes to their propin.dat file caused by edited or new materials.

With the advent of the new materials management tools, this is probably not necessary any more because they now have the protection offered by the Default.mat file and/or other custom .mat files.

Users that have created custom propin.dat files for safekeeping can use these files with the new tools by moving them (or copies of them) to the materials folder and renaming them with a .mat extension. This is possible because propin.dat and .mat files are plain text (unformatted) files with identical internal organization.

Material "Library" Files—
It was discovered some time ago that a function similar to that provided by the new .mat files could be achieved by creating drawings with blocks composed if simple 3D objects with custom materials assigned to them. These "material library" files could be used to enhance the standard "read-only" propin.dat file by copying blocks from the "library" to another drawing in progress.

Upgraders may want to consider converting these "libraries" to .mat files. This can be accomplished by opening a "library" file and selectively saving the file's materials to one or more .mat files.

Top of page

Frequently Asked Questions

I have read the article and the FAQ but I still have questions.
To benefit as many users as possible, please post your questions and comments in the TurboCAD Forum using the v7.1 Materials System thread.
My propin.dat file is a mess! Is there a simple way to restore it to the original (as installed) state?
Yes. If you have not altered the Default.mat file, close down TurboCAD and delete propin.dat. After re-starting TurboCAD, propin.dat will be identical to Default.mat.
How do I rename an existing material?
In the Materials editor, navigate to the material that you want to rename. Then, click on the lower "New" button and fill-in the new name in the pop-up dialog. When you click "Ok", a duplicate of your material will be created with the new name. Now you can navigate to the original material and delete it. (This answer from Pjay)

Top of page

Revisions:

5/22/01
Original post
5/23/01
Reworded the paragraph following "Confirm Material Replace" Dialog— to improve clarity
6/21/01
Corrected the statement that users can choose new names with the rename function. Also expanded the note that follows the "Rename" paragraph
6/24/01
Updated FAQ
6/27/01
Added note about .mat files for users of Microsoft Access.
12/17/01
Updated to show the difference between v7 and v8 in the restore function

Valid XHTML 1.0! Top of page