News:

Interested in some really terrific mobile apps? Visit www.turboapps.com for details.

Main Menu

VBScript to target a selected light to a selected object.

Started by kchapman, June 02, 2009, 10:22:27 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

kchapman

The attached vbscript changes a single selected light's direction to point to the center of a single selected object.

Usage:
Unzip the vbs file into a folder of your choice.
Open TurboCAD, open a drawing, and select one light and one target object.
Right-click on the vbs file and choose Open. (If Windows asks what program to open the file with, browse to c:\Windows\System32\wscript.exe.)
This script can also be loaded into the Macro Recorder Palette in TC16 and run from there.

Limitations:
The script currently only works on one light and object at a time.

As always, comments and suggestions for improvements are welcome (as are contributions of improved versions).



[attachment deleted by admin]

Dave C

Thanks for that.
Takes a lot of the hassle out of setting up lighting.

Regards
Dave
Dave C
TC Pro V14.2 - TC 21 Platinum 64 Bit Build 22.3
Intel i-4770K 3.5GHz
120GB ssd 2TB hd
16GB memory
64bit Windows 7 Pro

www.ipernity.com/fizzyfitz

kchapman


Dave C

Is there any chance that you may have one of these that will do the same for luminance?.....

Is that even possible?

Regards

Dave
Dave C
TC Pro V14.2 - TC 21 Platinum 64 Bit Build 22.3
Intel i-4770K 3.5GHz
120GB ssd 2TB hd
16GB memory
64bit Windows 7 Pro

www.ipernity.com/fizzyfitz

kchapman

Here is an updated version of the SetLightTarget script that can be loaded into TurboCAD's MacroRecorder Palette and run from there. This removes the need to browse for wscript.exe or to link .vbs extensions to that application.

Unzip the attached file to a location of your choice.
In TurboCAD, View/MacroRecorder Palette...
In the MacroRecorder palette, click on the Open icon, select files of type VBScript (*.vbs), and browse for SetLightTarget_MR.vbs.
Click on the Run button when the macro is loaded.

As before, to use the macro successfully, you must pre-select exactly one light and one graphic which should be the light's target. (The target can be any type of graphic except another light.)

[attachment deleted by admin]