This might work in some simple cases. But in more complex models it might fail. Give it a go.
Dim doc As PartDocument = ThisDoc.Document
Dim features = doc.ComponentDefinition.Features.ThickenFeatures
Dim asset As Asset = doc.Assets.Add(
AssetTypeEnum.kAssetTypeAppearance,
"Generic",
"appearances")
Dim uColor As ColorAssetValue = asset.Item("generic_diffuse")
uColor.Value = ThisApplication.TransientObjects.CreateColor(255, 0, 0)
For Each item As ThickenFeature In features
Dim distance = item.Distance.Value
If (distance = 0.5) Then
For Each outputFace As Face In item.Faces
outputFace.Appearance = asset
Next
End If
Next
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

Blog: hjalte.nl - github.com