News:

When replying to a specific statement be sure to quote the previous post.

Main Menu
TurboCAD 2026 Platinum box
Now available

TurboCAD 2026.2

The latest update for TurboCAD 2026. It installs over any 2026 build and keeps your activation, drawings and settings. Get it from the Start Page or Help > Check for Update.

Ruby scripting - any beta tester feedback?

Started by murray dickinson, March 08, 2011, 04:18:54 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

murray dickinson

Bob Mayer said that they were looking at Ruby scripting some time back, and the blurb says it's now implemented in deluxe, and upwards.  It sounds like it should be more accessible than current scripting.  Any examples of that being so, or any comparison between Ruby and VBS performance or reach?

Rod Cole

Murray, +1 on the above.  I am really looking forward to learning Ruby.  I have some books and other resourses that I have collected over the last few months.

I use Chief Architect along with TC, and CA has also implemented Ruby as a scripting language.  Having the two programs that I use most often implement Ruby is a big incentive for me to get busy learning the language.

Are you new to Ruby, or an experienced user?
TC V21 Pro Platinum  Win 7 Professional

murray dickinson

Big noob, Rod!  I've been able to take advantage of some of the VB and VBS scripting that's been done by the clever folk over the years, but I've only been able to make changes to their work, using sucking-and-seeing.  I can get some things done using the macro recorder and another tool to record keyboard stepping, and I've been able to use AutoIT to do the equivalent of batch filing, but I've not once been able to start with a blank page and get a script to interact with graphics in a file in the way I want it to.  I've been functionally syntax-and-format dyslexic till now.  I'm hoping Ruby will help me get over that hump.

Rod Cole

I have taken programing classes years ago.  Up to the point of having to program our own database application with error checking.  That was school though, the real world is much harder than that.

I used to do quite a bit of AutoLisp a few years back, but not since moving to TC.  To tell you the truth I always found the SDK kit a bit confusing and never really had the time to sort through it enough to get a good start.

I did do some VisualBasic.NET a while back, but nothing serious.  I hope Ruby works out this time.  I would really like getting back into programing a few things that might prove useful for my work.

Once we get our hands on Ruby, maybe we can share notes on how things are working out.  Good Luck.
TC V21 Pro Platinum  Win 7 Professional

cdsgraphics

Quote from: Rod Cole on March 08, 2011, 06:38:04 PM
I use Chief Architect along with TC, and CA has also implemented Ruby as a scripting language.  Having the two programs that I use most often implement Ruby is a big incentive for me to get busy learning the language.

That's interesting...beginning w/ which version
Take Care
Craig
Using TurboCAD v18.2; Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz;<BR>Win 7 ProSp1; 6GB DDR3 1333MHz RAM; EVGA GeForce GTX 460 1GB
DeviantArt Gallery @ http://crag-dolomite.deviantart.com/gallery
TurboCAD Animators @ http://www.vimeo.com/channelTCAnim

Rod Cole

#5
Chief Architect started Ruby Script in X3, the current version, but it is only a partial implementation.  I am one of the beta testers, and it seems like a good time to get up to speed with Ruby now since a lot of things come at you fast in beta.

I am hoping that X4 will be a full, or nearly full implementation of Ruby.
TC V21 Pro Platinum  Win 7 Professional

MarkS

Ruby is a pretty cool language. I'm glad they're opening it up to deluxe users, since I'm sure it will be a long time before I'd be able to justify Pro v 18.

What sort of things do people imagine they would use this SDK for?

Mark
TCW Pro 14.2
TC Deluxe 16.2 Build 53.2

Rod Cole

#7
Right now, since I do not know how Ruby is set up in TC I can only guess at what can be done.

One of the things that I would like to do is add a few of my own AutoCAD like features to TC.  One of the first would be to do something similar to the SI or Single viewport feature.  If that feature is in V18, I have not found it yet.

I can do this now in TC by correctly sizing and proportioning the viewport and then selecting the viewport border and using the Zoom to Selection command and then the Model Space Floating command.

At first I think I will just try to do a few things like that.  Just putting a group of commands together in a script, then figuring out a way to call them up quickly.

TC V21 Pro Platinum  Win 7 Professional

Brad Easterday

I’m excited to dig deeper into Ruby scripting with TC too. As I mentioned in another thread, my initial testing went very well. I haven’t taken the time to try anything in depth with Ruby scripting just yet. There are a handful of little scripts included with the v18 installation that do a few things such as drawing geometry and creating and renaming layers. The image below shows a list of the classes that are installed with TC v18.
Brad E.
TC 2022, 2023 Platinum
Windows 11 (64-Bit)

Alan C

Alan.
Platinum 21. & Deluxe 21.
TC user since 1995. (version 3)

cdsgraphics

Quote from: Brad Easterday on March 10, 2011, 07:46:06 AM
I’m excited to dig deeper into Ruby scripting with TC too.
I will delve into that too...
Take Care
Craig
Using TurboCAD v18.2; Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz;<BR>Win 7 ProSp1; 6GB DDR3 1333MHz RAM; EVGA GeForce GTX 460 1GB
DeviantArt Gallery @ http://crag-dolomite.deviantart.com/gallery
TurboCAD Animators @ http://www.vimeo.com/channelTCAnim

Brad Easterday

#11
I had some time to experiment a bit more today. I'm finding the SketchUp Ruby API docs to be a useful resource.

http://code.google.com/apis/sketchup/docs/index.html

I tried using an existing SketchUp Ruby script from the web but it wouldn't run on the first few tries. After some code massaging it worked just fine. That's encouraging.
Brad E.
TC 2022, 2023 Platinum
Windows 11 (64-Bit)

Rod Cole

Thanks Brad, have you located any info on TC's methods for Ruby yet?

Right now I am going through a book on Ruby basics.  I should be far enough along in a day or two to start looking at the TC scripts.
TC V21 Pro Platinum  Win 7 Professional

Alan C

Quote from: Brad Easterday on March 11, 2011, 10:08:57 PM
I had some time to experiment a bit more today. I'm finding the SketchUp Ruby API docs to be a useful resource.

http://code.google.com/apis/sketchup/docs/index.html

I tried using an existing SketchUp Ruby script from the web but it wouldn't run on the first few tries. After some code massaging it worked just fine. That's encouraging.
Brad, thanks, that is certainly encouraging. Would there be any issues regarding intellectual property using or adjusting  a script designed for use with a different program?
Alan.
Platinum 21. & Deluxe 21.
TC user since 1995. (version 3)