Hello,
Currently i'm able to create new material list using c# but it does not work for Appearence Properties.
The color and other info only added in graphics properties and not appearance properties.
*attached is the screenshot of Material Editor window show the new material created. all the info added and graphics color was set. but the appearence properties does not follow the info used.
Any ideas how to do this? appreciate all the help.
Thx
-nick-
Hello,
Currently i'm able to create new material list using c# but it does not work for Appearence Properties.
The color and other info only added in graphics properties and not appearance properties.
*attached is the screenshot of Material Editor window show the new material created. all the info added and graphics color was set. but the appearence properties does not follow the info used.
Any ideas how to do this? appreciate all the help.
Thx
-nick-
As far as I know (it has been almost a year since I looked into it though), there isn't yet a way to create / modify an AppearanceAsset (or rendering asset or whatever, I can't recall the specifics) within the API.
I remember it being quite frustrating as part of my addin's functionality was to allow the user to set custom materials for API created family instances (both material name and colour to be determined at run time or through external settings database). To just get something working I ended up manually creating a set of generic materials of various colours (an addin-specific template was being used) and then limited the user's colour selection to this set and did a simple Material.Duplicate() on the appropriately coloured generic material to allow custom naming. Maybe something similar could work for you?
If anyone has information contradicting this, then I am also quite interested as I'd like to go back and update that feature to not rely on a library of pre-existing materials.
As far as I know (it has been almost a year since I looked into it though), there isn't yet a way to create / modify an AppearanceAsset (or rendering asset or whatever, I can't recall the specifics) within the API.
I remember it being quite frustrating as part of my addin's functionality was to allow the user to set custom materials for API created family instances (both material name and colour to be determined at run time or through external settings database). To just get something working I ended up manually creating a set of generic materials of various colours (an addin-specific template was being used) and then limited the user's colour selection to this set and did a simple Material.Duplicate() on the appropriately coloured generic material to allow custom naming. Maybe something similar could work for you?
If anyone has information contradicting this, then I am also quite interested as I'd like to go back and update that feature to not rely on a library of pre-existing materials.
Dear Nik and Scott,
Thank you for your query and sorry that this is moving forward so slowly.
Unfortunately, all I can say is that we have a wish list item open for this, so I basically have nothing to add to Scott's information.
Here is an overview of what I can cotribute to material handling via the Revit API:
http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.5
http://forums.autodesk.com/t5/Autodesk-Revit-API/Create-new-material-and-set-appearance/td-p/4373625
I hope this helps.
Best regards,
Jeremy
Dear Nik and Scott,
Thank you for your query and sorry that this is moving forward so slowly.
Unfortunately, all I can say is that we have a wish list item open for this, so I basically have nothing to add to Scott's information.
Here is an overview of what I can cotribute to material handling via the Revit API:
http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.5
http://forums.autodesk.com/t5/Autodesk-Revit-API/Create-new-material-and-set-appearance/td-p/4373625
I hope this helps.
Best regards,
Jeremy
Would this be an update?
Dale
Would this be an update?
Dale
Can't find what you're looking for? Ask the community or share your knowledge.