JoeBayLD Posted July 4, 2021 Share Posted July 4, 2021 I'm updating a handful of lighting devices in python, however the changes don't apply until I refresh the devices via the menu command "Refresh Lighting Devices". Is there a way to call this function in my script? Quote Link to comment
Pat Stanford Posted July 4, 2021 Share Posted July 4, 2021 Yes. My Python is very weak, so here is some Vectorscript instead. I also do very little with lighting devices, so I don't know if the LDevice_Reset is enough as there is also a procedure LDevise_ResetVisual that you might need to use in place of or in addition to the LDeviceReset line. This script resets every lighting device in the drawing. If you only want to reset certain devices, you can change the criteria portion of the ForEachObject command to limit the objects padded to the Execute procedure. HTH. Procedure RefreshLD; Var H1:Handle; Procedure Execute(Hd1:Handle); Begin LDevice_Reset(Hd1); End; Begin ForEachObject(Execute, ((PON='Lighting Device'))); End; Run(RefreshLD); Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.