Message 1 of 2
Swap a Material for another Material within the project doc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I would like to swap one material for another material. I tried setting the original material by material, by category and material class. None of these approaches seems to have any effect.
Also I am collection the system.type Material for my filtered element collector.
thanx
using (Transaction trans = new Transaction(_doc, "Material Swap"))
{
trans.Start();
Material oldMaterial = elemType as Material;
oldMaterial.MaterialClass = newMatType(strStyle_New).MaterialClass;
trans.Commit();
}