Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to remove painted material from faces of elements. This works fine on non-modified elements, but when an element's face has been split and the split faces are painted separately the code below doesn't work. Any ideas?
using (Transaction t = new Transaction(doc, "Removing Paint From Selected Elements")) { t.Start(); foreach (Element elem in Elements) { GeometryElement geomElement = elem.get_Geometry(geoOptions); IEnumerator<GeometryObject> geomObjectEnumerator = geomElement.GetEnumerator(); while (geomObjectEnumerator.MoveNext()) { Solid solid = geomObjectEnumerator.Current as Solid; if (null != solid) { foreach (Face face in solid.Faces) { doc.RemovePaint(elem.Id, face); } } } } t.Commit(); }
Solved! Go to Solution.