Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

@PaulMunford,

 

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