07-05-2018
10:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-05-2018
10:02 PM
Try below iLogic code to set lightstyle.
Dim doc As Document
doc = ThisApplication.ActiveDocument
Dim ls As LightingStyle
If doc.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then
Dim oAssy As AssemblyDocument
oAssy = doc
ls = oAssy.LightingStyles.Item("Grid Light")
oAssy.ActiveLightingStyle = ls
Else If doc.DocumentType = DocumentTypeEnum.kPartDocumentObject Then
Dim oPart As PartDocument
oPart = doc
ls = oPart.LightingStyles.Item("Grid Light")
oPart.ActiveLightingStyle = ls
End If
Thanks and regards,
CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network
