Jump to content

Spotlight - Refresh lighting devices from Python


Recommended Posts

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);

 

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...