Map old Materials Database to a new one
Map old Materials Database to a new one
(OP)
We have used the default SolidWorks Materials Database and several of our own databases for over a year. Up until now, no control existed over the creation or modification of our data; users created materials and databases as they had the need.
Now we want/need to implement a new Materials Database to clean up this mess. When it's done, we want to erase the old stuff.
We have finished the new database (as we believe we want it as the finished product). As much as possible, existing material names and properties have been copied from the old files into the new (except for junk).
We then replaced the old sldmat files with the new one. Now when a part is opened and the material is edited, a warning says the material could not be found and a "Temporary Database" is started.
OK, this behavior is expected: I’ve eliminated a data source and I haven’t done anything to tell the part to look elsewhere for data. What I'm looking for is a method or a macro or a suggestion on how to map the material name from one database to another. I’m thinking that a macro could do this, but I have zero experience with writing macros.
Would it be possible to open a part and execute a macro that queries the existing material name and maps it to the new sldmat file? And as long as I’m asking, could this be done as a bulk process (Task Scheduler maybe??) ?
Thanks for yer support! and please, minimize the scolding
DC
SolidWorks 2007 SP 2.1
Windows XP
Now we want/need to implement a new Materials Database to clean up this mess. When it's done, we want to erase the old stuff.
We have finished the new database (as we believe we want it as the finished product). As much as possible, existing material names and properties have been copied from the old files into the new (except for junk).
We then replaced the old sldmat files with the new one. Now when a part is opened and the material is edited, a warning says the material could not be found and a "Temporary Database" is started.
OK, this behavior is expected: I’ve eliminated a data source and I haven’t done anything to tell the part to look elsewhere for data. What I'm looking for is a method or a macro or a suggestion on how to map the material name from one database to another. I’m thinking that a macro could do this, but I have zero experience with writing macros.
Would it be possible to open a part and execute a macro that queries the existing material name and maps it to the new sldmat file? And as long as I’m asking, could this be done as a bulk process (Task Scheduler maybe??) ?
Thanks for yer support! and please, minimize the scolding
DC
SolidWorks 2007 SP 2.1
Windows XP






RE: Map old Materials Database to a new one
SW07-SP3
RE: Map old Materials Database to a new one
No, I have not touched the original solidworks materials.sldmat file.
We have a network location that everyone maps to in their System Options / File Locations / Material Databases.
DC
RE: Map old Materials Database to a new one
SW07-SP3
RE: Map old Materials Database to a new one
We have a network location that everyone maps to in their System Options / File Locations / Material Databases.
DC
RE: Map old Materials Database to a new one
Pete
RE: Map old Materials Database to a new one
If you go that route make a backup of the original file ... just in case.
SW07-SP3
RE: Map old Materials Database to a new one
The editing of the sldmat files is not the problem.
The problem is the name of the files.
Let me use an example:
I have assigned material to a part from a file "My Materials.sldmat" containing AISI 304.
There is a new material file "Company Materials.sldmat" containing AISI 304.
I want to eliminate "My Materials.sldmat".
When "My Materials.sldmat" is removed, then I open my part and edit the material, AISI 304 is not recognized and a Temporary Database is opened.
I must fix the problem by manually picking "Company Materials" and then AISI 304.
So, I have a method that works, but I want to know is if there is a means to automate or simplify or mass execute this process using a macro or some other means.
Thanx.
DC
RE: Map old Materials Database to a new one
Matt
CAD Engineer/ECN Analyst
Silicon Valley, CA
http://sw.fcsuper.com/index.php
RE: Map old Materials Database to a new one
We will have to search around.
Chris
SolidWorks 07 3.0/PDMWorks 07
AutoCAD 06
ctopher's home (updated 03-26-07)
RE: Map old Materials Database to a new one
Set Material Property Name Example (VB)
in SolidWorks and Add-Inns API help.