Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, I found this code on another form that rotates your appearance, like if you have a wood grain and want the direction to be different. Unfortunately, it keeps giving me the error "Object reference not set to an instance of an object."
I am not skilled enough to know what's going wrong here. Any help would be greatly appreciated 🙂 thanks!
Dim oDoc As PartDocument = ThisDoc.Document Dim oAppearance As Asset = oDoc.ActiveAppearance Dim oValue As AssetValue For Each Value In oAppearance If oValue.ValueType = AssetValueTypeEnum.kAssetValueTextureType Then Dim oTextureAssetValue As TextureAssetValue = oValue Dim oTexture As AssetTexture = oTextureAssetValue.Value If oTexture.Item("unifiedbitmap_png").Value <> ""Then oTexture.Item("texture_WAngle").Value = TextureAngle End If End If Next
Solved! Go to Solution.