
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi! I've been trying to change several parameters in Revit, I've managed to do so with normal "string" parameters and for yes/no parameters. Now I'm trying to do the same to change a material type. The problem is that with the methods i've used before (parameter.set(integer) or parameter.setvalueasstring("Value")) don't seem to work.
Do I need to do something else for this to work with material types? (Not sure if that's the right word for it either, I mean materials I can select in the material browser). After some searches online I found something about declaring an elementid for a material, but I really would not know where to find which ID to use.
When executing the code there is no error message, and the other appends do come through, however no changes to the material are visible.
My code looks something like this. As said before, I've been using para.set(int) to change values up til now.
Thanks in advance!
Element testgevel = doc.GetElement(new ElementId(Convert.ToInt32(subelement))); Parameter para = testgevel.LookupParameter("materiaal_metselwerk");
Solved! Go to Solution.