TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

When posting a problem be sure to include which version you are using.  Give as much information as possible.  If the problem is with a specific file be sure to attache it to your post.

TC 19.2 install is missing Ruby Scripts
Read 612 times
February 13, 2018, 07:46:49 PM
I have a standard install of TurboCad V19.2 Platinum Pro.  For the first time ever, I opened the Ruby Script Console, but found it empty as in no scripts.  Poking around (searching my HD for *.rb) I found 15 .RB files tucked away in DIR C:Program FIles/IMSMDesign/TCWP19/Program/RubyScripts.  I was looking specifically for ImportXYZLines.rb or ImportXYZPoints.rb as a friend has in his TC2017 Plat Pro, but they are not among the 15 files located above.
The help manual has no info on Ruby Scripts at all.  So first; are they sort of a key-stroke macro facility?  Are they user generated?  Is there a library of scripts available to me?  And finally, how do I point the Ruby Console to the scripts I located or those in a library?  And if I have to write a script myself, what is the method?


* February 14, 2018, 12:38:00 AM
The xyz lines or points was written by Kevan Chapman, an IMSI employee in 2013 so only appears from v20 onwards,  I just tried copying and pasting into v19, and on running got an 'uninitialized constant Object::TCApplication' error, so looks like it would need alteration to get it working in v19 (I've no idea if its possible).

At the bottom right of the ruby console is a blank (to start with) drop down list which auto runs the selected script,  to see the script one uses the 'load' button to find the script on the computer and view it in the console in theory one should be able to press 'execute' to run the displayed script, but it doesn't work on my computer.

As for writing ruby, there is an SDK section for Ruby Here, but whether anyone actually uses Ruby and can answer questions, it looks doubtful.


February 14, 2018, 06:02:22 AM
Thanks for the reply, Andy. 
I found the Ruby forum after posting here, and pretty much came to the conclusion that it took programming skills above my paygrade to write my own scripts.  Not a clue how to interface with TC at that level.  I gather that Ruby Scripts is sort of a dead branch of the TC tree.
PS.  I sure appreciate you folks that monitor these forums and help those of us trying to learn to use TurboCad effectively.


* February 14, 2018, 08:45:09 AM
I don't know what format your coordinates are in, but I did a little digging around and found this post by Marek, SDK post , his import points2 file is an exe (which windows will complain about), as far as I can tell, the coordinates have to be in a specific format, with x y z separated by a space and decimal points as a comma.

I tested using a simple txt file in v19 using
0 0 0
5 5 5
10 10 10
etc.  and it works fine.

It imports the coordinates as (tiny) points, so if you try it, use a blank TC file, and after clicking the 'plot points' button, in TC use CTRL+A to select all, and in the selection palette / properties,  change the points to cross and a bit larger so you can see them.

Marek still visits the forum so if it looks like what you are after, maybe he will comment further.
« Last Edit: February 14, 2018, 08:46:54 AM by Andy H »


* February 14, 2018, 12:02:44 PM
The architecture tool import terrain seems tolerant bringing in xyz points as .txt.  It creates a triangulated surface  with the points as perimeter polyline, uncomplicated to clean up.  The older TC Ruby and scripts have identification that indicates (I was going to say "points to".  confusing) being based on Sketchup ruby.  I don't know what difference that makes, apart from the prominent one, not being plug'n'play interchangeable with later TC Ruby.
« Last Edit: February 14, 2018, 08:22:01 PM by murray dickinson »