TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

Register
 
The purpose of these forums is to discuss TurboCAD.  Please keep the discussion of other products to compatibility issues or how the other software’s can be used with TurboCAD.


VBScript to target a selected light to a selected object.
Read 4979 times
* June 02, 2009, 10:22:27 PM
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]

Logged


July 09, 2009, 09:27:29 AM
#1
Thanks for that.
Takes a lot of the hassle out of setting up lighting.

Regards
Dave
« Last Edit: July 10, 2009, 02:06:54 PM by Troubled »

Logged
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


* July 10, 2009, 10:26:15 AM
#2
I'm glad you find it useful!

Logged


July 10, 2009, 05:10:18 PM
#3
Is there any chance that you may have one of these that will do the same for luminance?.....

Is that even possible?

Regards

Dave

Logged
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


* September 26, 2009, 04:09:16 PM
#4
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]

Logged