Glass Material type on Sweep not working in RVT file

Glass Material type on Sweep not working in RVT file

RakeshBSalwe
Contributor Contributor
410 Views
2 Replies
Message 1 of 3

Glass Material type on Sweep not working in RVT file

RakeshBSalwe
Contributor
Contributor

Need your assistance, as I have created Sweep (Solid) and used material type as Glass for same.

Its behave correctly with transparent behavior in RFA file,  but adding same RFA into RVT, the behavior of Sweep is not transparent (its seems to be solid).

0 Likes
Accepted solutions (1)
411 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni
Accepted solution

This appears to me to be more of a product issue or a question on how to set up and use the family definition appropriately, and not so much a programming issue. Some participants here are very knowledgeable in all these areas and may be able to help. Otherwise, I would also suggest raising this question in a more product oriented Revit support forum, e.g., the architectural one, which is the largest.

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 3

RakeshBSalwe
Contributor
Contributor

Hello Jeremy,

 

I have contacted with Product team, and got to know issue is with transparency value that need to be set. I tried below mentioned code for same.

 

var p = sweep.get_Parameter(BuiltInParameter.MATERIAL_ID_PARAM); 
IEnumerable<Element> materials = new FilteredElementCollector(doc).OfClass(typeof(Material))
.Cast<Material>().Where(q => q.MaterialClass == "Glass");
foreach (Material m in materials)
{
if (m.Name == "Glass")
{
m.Transparency = 90; 

p.Set(m.Id);
p.Set(m.Transparency); 

}
}

 

but this updates the Transparency value under "Graphics" tab, but to resolve this issue, need to Transparency value under "Appearance"  tab. Can you please guide me here, which api help to achieve this.

Please find the attachment for your reference.

 

0 Likes