AnsweredAssumed Answered

Set transparency on  Solid Body with texture

Question asked by Alexis Lebon on Oct 24, 2019

Hello,

 

I try to set the transparency of my solid body with texture, my code:

 

Bodies = CType(CType(swDoc, PartDoc).GetBodies2(swBodyType_e.swSolidBody, False), Object())

 

For Each swBody In Bodies
   Dim nMatPropBody() As Double = CType(swBody.MaterialPropertyValues2, Double())
   If nMatPropBody IsNot Nothing Then
            nMatPropBody(7) = 0.75
            swBody.MaterialPropertyValues2 = nMatPropBody
     End If

Next

But it does nothing, whereas for bodies with color that apply transparency...Morever, when transparency is enable that disable the transparency when my body have texture.

Any solutions?

Outcomes