Win32API is included in the full download of Ruby. Here is a list from my Ruby install folder Ruby 1.8.6
Googling, I found no usable result for Win32API.rb except for JRuby.
Win32API is included in the full download of Ruby. Here is a list from my Ruby install folder Ruby 1.8.6
Googling, I found no usable result for Win32API.rb except for JRuby.
The download link is broken. The big green download button returns a 404 page not found.
In SuRDebug, I do something like:
cmd = "\"" + sketchupDir + "\\plugins\\SuRDebug\\SuRDebug.exe\" --suver=#{suVer}";
puts cmd;
systhr = Thread.new(){`#{cmd}`}
You can also try:
systhr = Thread.new(){system(cmd)}
but, for me, it left a command window open.
When I close SketchUp, my debugger console get the following messages.
C:/Program Files/Google/Google SketchUp 7/Plugins/LibFredo6_Dir_31/Lib6Core_31.rb:270: warning: parenthesize argument(s) for future version
C:/Program Files/Google/Google SketchUp 7/Plugins/PutOnLayer.rb:78: warning: don't put space before argument parentheses
(eval):1: warning: already initialized constant SU_MAJOR_VERSION
C:/Program Files/Google/Google SketchUp 7/Plugins/LibFredo6_Dir_31/Lib6Mark_31.rb:325: warning: don't put space before argument parentheses
C:/Program Files/Google/Google SketchUp 7/Plugins/LibFredo6_Dir_31/Lib6Mark_31.rb:331: warning: don't put space before argument parentheses
C:/Program Files/Google/Google SketchUp 7/Plugins/LibFredo6_Dir_31/Lib6Mark_31.rb:335: warning: don't put space before argument parentheses
C:/Program Files/Google/Google SketchUp 7/Plugins/LibFredo6_Dir_31/Lib6Mark_31.rb:339: warning: don't put space before argument parentheses
C:/Program Files/Google/Google SketchUp 7/Plugins/LibFredo6_Dir_31/Lib6Protractor.rb:154: warning: don't put space before argument parentheses
C:/Program Files/Google/Google SketchUp 7/Plugins/LibFredo6_Dir_31/Lib6Startup_31.rb:58: warning: don't put space before argument parentheses
C:/Program Files/Google/Google SketchUp 7/Plugins/LibFredo6_Dir_31/Lib6Tool_31.rb:325: warning: don't put space before argument parentheses
C:/Program Files/Google/Google SketchUp 7/Plugins/LibFredo6_Dir_31/Lib6Tool_31.rb:437: warning: don't put space before argument parentheses
C:/Program Files/Google/Google SketchUp 7/Plugins/LibFredo6_Dir_31/Lib6Tool_31.rb:653: warning: don't put space before argument parentheses
C:/Program Files/Google/Google SketchUp 7/Plugins/LibFredo6_Dir_31/Lib6Traductor_31.rb:47: warning: don't put space before argument parentheses
(eval):3081: warning: parenthesize argument(s) for future version
(eval):3104: warning: parenthesize argument(s) for future version
key = Units
value = 0.0
key = StampOffset
value = 12.0
key = GridSpacingX
value = 120.0
key = SmooveRadius
value = 360.0
key = GridSpacingY
value = 120.0
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
free_Command
@billbell52 said:
I am on this quest to get Netbeans IDE working with SU Ruby. The development version of Netbeans has a capability to attach a debugger to a Ruby process.
...
From a quick reading, it looks like this is an ide to attach to a Ruby script run from the command line.
SketchUp, however, runs scripts from an embedded version of Ruby. Not the command line. So there's no port or process to attach to.
Secondly, running the rudebug-ide would not give you access to the SketchUp Ruby extensions embedded inside SketchUp. Eg., If you issue a UI.messagebox() call (or any SketchUp call) from your script loaded by rdebug-ide, it'll just get an "unknown method" error.
Third, the SketchUp Console is in control of all Standard in, out, and err I/O streams. Ruby-ide will have to redirect the SketchUp Console I/O to itself, then restore them when it's finished.
For MS windows, an alternative might be:
http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=18130
SketchUcation Community Forums • View topic - [plugin] SuRDebug
@davidsuke said:
It is a excellent tool!! Only one bad thing, no syntax highlighting, but it's great!!
Thanks for the advice!!
If you want syntax highlighting you can use the editor here.
http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=18130#p146440
[plugin] SuRDebug
Beautiful !
Is the .skp available? for us wood manglers to explode and see and learn the parts?
@thomthom said:
Ugh... Mac compatibility was the reason I'm trying to use the IDs since Mac truncates the tool names so you can't tell PolyTool apart from MoveTool or TextTool.
Is it possible that the trucation is consistent enough that you could use a combination of the trucated name and the inspect id to create a hash to dynamically identify the tool?
Don't mean to insult your intelligence.
What does the trucation look like. I don't know, I don't have access to a mac.
If you had a map consisting of the SketchUp version number, the OS, the ordinary sequence of the Tools menu, the Ids of the ordinary menu, the inspect id of the tools, then you might be able to hack a hash of the Tool name.
If the user changes the Tools structure with a C extension or insertion, then they'll just have to punt. You still catch 99% of the users.
You should be able to get the Tool id from a "Tools observer" test script while physically observing your actions plus the report of the tool id.
Hope something of this helps.
@thomthom said:
Btw, how are native menu items shifted about? Can they be modified somehow? I thought that ruby menu items where added to the bottom of the menus. But you're saying they can affect the native menu items?
When I wrote EventRelay, I noticed that I could not depend on menu items being constant.
I'm saying that native menu items shift about all on their own without the help of us script writers.
Eg., the Edit menu structure menu id's even share ids depending on what's selected before the user invokes the menu. Id 41002 can be "Delete Component" or "Flip along Groups Red" depending on the selection.
I'm suggesting that plugin menu id's are dynamic according to the order in which SketchUp finds them in the Plugin folder.
Insert a new plugin, your old plugin menu id may change.
I'm suggesting that the Tools menu id may change depending on whether I added someones C extension in the Tools menu.
I know it's frustrating and annoying. But that's the way (at least in windows) menu structures work.
Before EventRelay could translate a user command to a menu id, it had to ask, each time, the windows menu routines for its current menu id for a particular menu entry. It would have been so much easier had they been constant. No such luck, however.
@thomthom said:
Hmm... interesting. But that's not the Tools. Just general references to commands.
What I had tried was looking through all the classes that existed. Thinking there'd be one for each tool as you'd do when you create a ruby tool. But there was nothing there either.
My experience with those "constants" are that they are not always "constant". They're actually menu ids.
As long as the tool menu does not change, they'll work, but if someone inserts or changes the order of the menus, they shift around.
You can find all menu ids using EventRelay and the example script at http://code.google.com/p/eventrelay/wiki/EventRelay
# ----------------------------------
# Menus
# ----------------------------------
def OnMenuSelected?(menuId, menuLabel)
puts "MENU SELECTED MenuId?[#{menuId}] label[#{menuLabel}]"
return ALLOW
end #OnMenuSelected?