Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Please could you help me to set the active lighting style with iLogic?
This code will get the active lighting style name, but I can't set the active lighting style - what am I missing?
Dim oAssy As AssemblyDocument = ThisApplication.ActiveDocument Dim oLightStyleName As String oLightStyleName = oAssy.ActiveLightingStyle.Name MessageBox.Show(oLightStyleName, "Title") 'This line doesn't work oAssy.ActiveLightingStyle.Name = "Grid Light"
P.S. I found this post on the manufacturing dev blog. I have converted it to iLogic, but it doesn't work for me 😞
http://adndevblog.typepad.com/manufacturing/2015/07/change-activelightingstyle.html
Sub ChangeLightingStyle()
Dim doc As Document
Set doc = ThisApplication.ActiveDocument
Dim lss As LightingStyles
Set lss = doc.LightingStyles
' Let's just use the first style
' InternalName: "1:Cool Light"
doc.ActiveLightingStyle = lss("1:Cool Light")
End Sub
Solved! Go to Solution.
