Hi Autodesk,
there is another bug in the API.
When copying a Material element from one document to another one, its render appearance will not be transferred, too.
Found with Revit 2015 and 2017.
Regards,
Revitalizer
Solved! Go to Solution.
Solved by matthew_taylor. Go to Solution.
Hi @Revitalizer,
It would not surprise me. Duplicating a material doesn't copy across project shared parameter values when using the UI.
I tested whether this bug is the same when using the UI (in 2017 - copy/paste, taking care to select the material element, a model element, and paste into a legitimate view), and it is.
So, it's a general Revit issue, not an API issue.
Did you report it?
Cheers,
-Matt
Hi Matthew,
no bug because it is Revit's default behavior. I think that explains it.
Thank you for clarifying.
Nonetheless, the copy/paste behavior is not really satisfying because the render appearance is an important part of a material.
Since we still cannot set it via API, the copy/paste method seemed the only approach to add it to the document.
<Sigh.>
Revitalizer
Hi @Revitalizer,
I put in a bug report about not duplicating the shared parameter values (REVIT-90676) last year. The report suggested that they were looking at fixing it for 2018.
Did you try duplicating any supporting elements (in a different transaction?) before copying the material? Probably just as easy using the UI for that, come to think of it...
Anyway, I'm sure you've gone through all the possibilities, but let me know if you want to throw some ideas about!
Cheers,
-Matt
Dear Revitalizer and Matt,
Thank you for your report and pointing out the existing development issue REVIT-90676 [Value is blank for Duplicated Materials].
As far as I can tell, it is indeed scheduled to be resolved in the next major upcoming release.
I added a note to it of your discussion above and asked for confirmation.
I hope this helps.
Best regards,
Jeremy
Hi Jeremy,
the next upcoming release - will that be this year or next year ?
Greetings,
Rudi
Dear Rudi,
this 🙂
Cheers,
Jeremy
Dear Rudi,
For safety's sake, I checked with the development team, and I am sorry to say that it may well take until next year after all..
They say: I'm not sure if it is just a small improvement. Materials dialog and content is an external component. We need to copy Revit data when material is duplicated by the component.
Cheers,
Jeremy
Hi Jeremy,
I thought as much 😞
I already know that all the materials stuff is an external component, but if it has an API for Autodesk's product developers,
it would be fine if it could be made accessible for the end users.
Any access would be an improvement compared to the state of now.
The copy/paste approach would have been only a workaround,
caused by the rudimentary access to the material properties, even after all the years.
But of course both ways should function in the future: direct write access to material properties and copying elements with all the depending aspects.
Cheers,
Rudi