How to set bodies transparent in Mechanical?
Ayush Kumar
Member, Moderator, Employee Posts: 444
✭✭✭✭
Answers
-
From 2021R1 onwards:
transparency = body.PropertyByName("Transparency") # Change the value from 0-1, 1 being opaque, 0 being completely transparent. transparency.InternalValue = 0.5
2 -
The transparency property is added for 2021 R1. Do we have a js method for 2020R2 and older?
0 -
For previous versions (from Landon Kanner's TIG post):
DS = ExtAPI.DataModel.InternalObject["ds"] bodies = ExtAPI.DataModel.Project.Model.Geometry.GetChildren[Ansys.ACT.Automation.Mechanical.Body](True) DS.Graphics.Drawable(bodies[0].InternalObject).Material.Transparency = 0.5
2