Hi,
I am working on a plugin that exports geometry from a Revit file to a custom file format and I would also like to export textures and texture coordinates for each object.
I have read in previous forum posts from a couple of years ago that this has not been possible in the recent versions of Revit. What is the status on the matter today in 2017?
One would expect texture coordinates to be a property of the Face, Mesh or MeshTriangle class but as far as I can see it's not.
Best regards,
Elias Furenhed
Solved! Go to Solution.
Solved by jeremytammik. Go to Solution.
Dear Elias,
Thank you for your query.
The texture information is obviously defined by the materials assigned.
The appearance of materials can be handled via the Revit API as of 2018.1.
Look at the new Visual Materials API in Revit 2018.1:
http://thebuildingcoder.typepad.com/blog/2017/08/revit-20181-and-the-visual-materials-api.html
One developer asked: Having reviewed the "Editing the properties of an Appearance Asset" section of your "Major additions to the Revit 2018.1 API" document, it appears that access to material thermal and mechanical properties is still not available. Is this correct? Can you confirm, please? Thank you!
I discussed this with the development team, and they say:
It is already available, via the properties of PropertySetElement, and the stored id's the Material has for structural and thermal properties.
Can you take a look at that and check whether it resolves you issue as well?
Thank you!
I hope this helps.
Best regards,
Jeremy
Hi,
Thank you for replying.
That's good news. Where can I find documentation of the Visual Materials API?
I have been able to extract UV coordinates and all other geometry data using CustomExporter, but what I'm now missing is the path to the texture file for the material of each geometry. Is this possible with the new Visual Materials API?
Best regards,
Elias
Dear Elias,
Thank you for your update and appreciation.
The only information I have about the Visual Materials API is pointed out in the post I already mentioned:
http://thebuildingcoder.typepad.com/blog/2017/08/revit-20181-and-the-visual-materials-api.html
It points out that an update 2018.1 version of the Revit SDK is provided in the Revit Developer Centre:
http://download.autodesk.com/us/revit-sdk/REVIT_2018_1_SDK.msi
It includes two new samples:
The former will hopefully answer all your questions in full.
I hope this helps.
Best regards,
Jeremy
Dear Elias,
Thank you for your patience and prompt for more help via other support channels.
I heard back from the development team on this issue now and published their answer on The Building Coder:
http://thebuildingcoder.typepad.com/blog/2017/10/material-texture-path.html
I hope this helps.
Best regards,
Jeremy
Hi,
Thank you for taking the time to investigate the issue.
I will try out your example and see if it solves my problem.
/Elias
Can't find what you're looking for? Ask the community or share your knowledge.