Message 1 of 1
I want to change color RGB using iLogic for inventor studio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to change color RGB using iLogic for inventor studio.
I would appreciate it if you could give me a solution for my work.
oName = "painting blue" oRed = Red oGreen = Green oBlue = Blue Dim oDoc As AssemblyDocument oDoc = ThisApplication.ActiveDocument Dim oAppearance As Asset 'get active appearance oAppearance = oDoc.ActiveAppearance 'create new appearance named painting blue If Not oDoc.ActiveAppearance.DisplayName = oName Then oAppearance = oDoc.Assets.Add(AssetTypeEnum.kAssetTypeAppearance, "Generic", "Appearances", oName) 'set new appearance active oDoc.ActiveAppearance = oAppearance End If 'set colors Dim oColor As ColorAssetValue oColor = oAppearance.Item("Color Setter 2019:1") oColor.Value = ThisApplication.TransientObjects.CreateColor(oRed, oGreen, oBlue)