SketchUcation Plugin Store

 

 

[Plugin-like] SketchTalk

[Plugin-like] SketchTalk

Postby MartinRinehart » Sat Dec 19, 2009 6:52 pm

SketchTalk is a layer between the SketchUp Ruby API and the model. It lets non-programmers use the Ruby Console for modeling. Then the non-programmers can gather their commands in a file; save the file with a ".rb" extension and, almost by accident, have written a program. Programmers can extend SketchTalk easily. It's described here:

http://www.MartinRinehart.com/models/tu ... ample.html
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.
MartinRinehart
 
Posts: 762
Joined: Mon Jul 27, 2009 1:13 pm
Name: Martin Rinehart

Re: [Plugin-like] SketchTalk

Postby Pixero » Sat Dec 19, 2009 7:09 pm

Wow, very interesting and impressive. I have to take this in for a while. :thumb:
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1284
Joined: Wed Nov 14, 2007 2:58 pm
Location: Halmstad, Sweden
Name: Jan Sandström
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin-like] SketchTalk

Postby Jim » Sat Dec 19, 2009 7:19 pm

Code: Select all
load 'sketch_talk.rb'
Error: #<LoadError: C:/Program Files/Google/Google SketchUp 7/Plugins/sketch_talk.rb:4:in `load': No such file to load -- /r/sketch_talk_classes.rb>
C:/Program Files/Google/Google SketchUp 7/Plugins/sketch_talk.rb:4
Jim
Global Moderator
 
Posts: 4126
Joined: Mon Nov 12, 2007 10:13 pm
Location: NEOH
Name: Jim
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin-like] SketchTalk

Postby MartinRinehart » Sat Dec 19, 2009 7:25 pm

Jim wrote:[code]load 'sketch_talk.rb'
Error: #<LoadError: C:/Program Files/Google/Google SketchUp 7/Plugins


Jim,

Make a dir that's very handy. Mine's C:\r\. Extract to there. In RC load "/r/sketch_talk.rb"
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.
MartinRinehart
 
Posts: 762
Joined: Mon Jul 27, 2009 1:13 pm
Name: Martin Rinehart

Re: [Plugin-like] SketchTalk

Postby Jim » Sat Dec 19, 2009 7:31 pm

Maybe, but that won't solve the problem of the missing sketch_talk_classes.rb file. (which I should have mentioned, sorry.)
Jim
Global Moderator
 
Posts: 4126
Joined: Mon Nov 12, 2007 10:13 pm
Location: NEOH
Name: Jim
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin-like] SketchTalk

Postby MartinRinehart » Sat Dec 19, 2009 7:51 pm

Jim wrote:Maybe, but that won't solve the problem of the missing file. (which I should have mentioned, sorry.)


Oh, dear. I hard coded my own path.

May be working now.
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.
MartinRinehart
 
Posts: 762
Joined: Mon Jul 27, 2009 1:13 pm
Name: Martin Rinehart

Re: [Plugin-like] SketchTalk

Postby tbd » Sat Dec 19, 2009 7:59 pm

cool. maybe it can extend my SME and have a more visual interface to it (non IT people are kinda scared by command line ;) )
SketchUp Ruby Consultant | Podium 1.x developer
http://plugins.ro
User avatar
tbd
 
Posts: 1018
Joined: Wed Nov 14, 2007 10:47 am
Location: Romania
Name: TBD

Re: [Plugin-like] SketchTalk

Postby MartinRinehart » Sat Dec 19, 2009 8:31 pm

TBD wrote:cool. maybe it can extend my SME


Need a link to some word of explain.

SketchTalk for you will be about 5 minutes of looking at the code.
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.
MartinRinehart
 
Posts: 762
Joined: Mon Jul 27, 2009 1:13 pm
Name: Martin Rinehart

Re: [Plugin-like] SketchTalk

Postby tbd » Sun Dec 20, 2009 12:21 am

SME is more like a visual editor for SketchTalk - a way to create ruby scripts using simpler, English like, words.

each command (box in UI) is a method that can be used and reused to do simple tasks. by combining it, like LEGO, you can create different repetitive tasks that speed up the workflow.

SME is another project that I will open source soon, so anyone can improve on it.
SketchUp Ruby Consultant | Podium 1.x developer
http://plugins.ro
User avatar
tbd
 
Posts: 1018
Joined: Wed Nov 14, 2007 10:47 am
Location: Romania
Name: TBD

Re: [Plugin-like] SketchTalk

Postby Mike Lucey » Sun Dec 20, 2009 1:29 am

Hi Guys,

Thanks Martin, this looks very interesting to a Rubyphobic like me :D Maybe I am wrong, but it looks to me that a non programmer can start to understand programming by mean of 'SketchUp to Ruby via Reverse Engineering'! Is this correct?

Mike
User avatar
Mike Lucey
Mayor
 
Posts: 7236
Joined: Mon Oct 22, 2007 1:22 pm
Location: Co. Clare, Ireland
Name: Mike Lucey
Operating system: Mac
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin-like] SketchTalk

Postby MartinRinehart » Sun Dec 20, 2009 3:00 pm

Mike Lucey wrote:this looks very interesting to a Rubyphobic like me


If you're good w/Sketchup, Mike, just turn to Chapter 11. You never know until you try. You might become Rubyphilic.
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.
MartinRinehart
 
Posts: 762
Joined: Mon Jul 27, 2009 1:13 pm
Name: Martin Rinehart

Re: [Plugin-like] SketchTalk

Postby mics_54 » Mon Dec 21, 2009 3:07 am

Martin is there a guide to the previous 10 chapters somewhere?

Can you define "good with Sketchup"?
mics_54
 
Posts: 302
Joined: Thu Jan 01, 2009 9:41 pm
Name: Michael
Operating system: Windows
SketchUp version: 8
License type: Free
SketchUp use: woodworking
Level of SketchUp: Beginner

Re: [Plugin-like] SketchTalk

Postby Pilou » Mon Dec 21, 2009 3:16 am

is there a guide to the previous 10 chapters somewhere?


Seems you can find it here (and then click the middle icon page bottom for begin... ;)

Does we can call that a "recorder" of actions ruby?

The very diffult thing was to find the SketchTalk itself ;)
Why not to put it in the first post :?:

Some minutes after :roll:
Ah damned that is not a recorder :oops: :D
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
Pilou
Top SketchUcator
 
Posts: 10027
Joined: Wed Jan 23, 2008 10:33 pm
Operating system: Windows
SketchUp version: 6
License type: Free
SketchUp use: hobby
Level of SketchUp: Advanced

Re: [Plugin-like] SketchTalk

Postby MartinRinehart » Mon Dec 21, 2009 3:44 pm

mics_54 wrote:Martin is there a guide to the previous 10 chapters somewhere?


The tutorial TOC lists tools covered and keyboard shortcuts for every chapter. If you expand the details you get titles of (which link to) each major section.

http://www.MartinRinehart.com/models/tu ... l_toc.html

mics_54 wrote:Can you define "good with Sketchup"?


There's a screenshot of a quarter circle of oval columns at the end of the Qrotate (Rotate, with the keyboard shortcut emphasized) tool section. If you can duplicate this without looking at the hint that follows, you are VERY good with SketchUp. If the hint that follows makes sense and you can make an oval column, you are good with SketchUp.

http://www.MartinRinehart.com/models/tu ... ml#qrotate
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.
MartinRinehart
 
Posts: 762
Joined: Mon Jul 27, 2009 1:13 pm
Name: Martin Rinehart

Re: [Plugin-like] SketchTalk

Postby MartinRinehart » Mon Dec 21, 2009 4:25 pm

Pilou wrote:The very difficult thing was to find the SketchTalk itself ;)
Why not to put it in the first post


If you just DL SketchTalk without looking at the SketchTalk by Example page, you won't have a clue. (First European explorer finds a banana. Bites. Terrible! Didn't know that you had to peel the thing.)

There are isolated bits of SketchTalk (the "mc" command is way better than Move/Copy) that stand on their own, but not many. It's really only good if you can add what you need when you need it. My cabinet example needed the "none" command.

So I added this trivial function:
Code: Select all
def none()
    Sketchup.active_model().
        selection().clear()
end # of none()


If you know a wee bit of the Ruby API, and where, in SketchTalk, to put that function, that's a trivial add. SketchTalk wants you to know enough to add simple bits to meet your own needs, so I'm deliberately steering you into the tutorial to learn a little (it only takes a little) Ruby and Ruby API.

If you go back to the bottom of SketchTalk by Example you'll see that I took your advice, partially.
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.
MartinRinehart
 
Posts: 762
Joined: Mon Jul 27, 2009 1:13 pm
Name: Martin Rinehart

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Need Authorised SketchUp Training by experts in various disciplines? Check out our Training details.

Ad Machine
Robot
 
Posts: 2012


Return to Plugins

Who is online

Users browsing this forum: jeffgo, mra, OSN58 and 4 guests