Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Programmatically set Appearance Properties using c#/vb

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
1731 Views, 3 Replies

Programmatically set Appearance Properties using c#/vb

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.

 

material editor.png

 

Any ideas how to do this? appreciate all the help.

 

 

Thx

 

-nick-


 

3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

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.

 

Message 3 of 4
jeremytammik
in reply to: Anonymous

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



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 4 of 4

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community