[Plugin] SUTool: a new way to manager your RB script
-
-
Jim
WebDialog has no methods to get the window's position,
I hava tried to get screen size using JavaScript in html with get_element_value methods,it can work in SU ruby panel.In html:
@unknownuser said:
<script language="javascript">
document.write('<div style="display:none;" ><input type="text" name="textfield" id="screen_width" style="width:150px;" value="'+ screen.width + '" /></div>')</javascript>In rb program:
@unknownuser said:
$dlg.get_element_value "screen.width"
when the program is running, $dlg.get_element_value "screen.width" always get nothing;but in ruby panel,$dlg.get_element_value "screen.width" return "1680",that's exact my screen width!
If somebody can tell me why and give me some advice, SUTool will go farther.If not, I will add a setting file to SUTool.User can modify it manually.
Another question,Jim,have you installed the full Ruby language?
-
wikii,
Yes, I have installed the full Ruby language installation.
The WebDialog should remember it's location if you have provided it the "preferences_key" option. Just don't call the set_size method and it should use the last size and location automatically.
-
@jim said:
iconv.dll comes when you install the full Ruby language. I have uploaded it here, but I'm not sure where to tell you to put it - I would try in the SUTools folder first, or the Plugins folder. It might not work at all.
The plugin works well for me. I will write up a quick How-to.
Thank you Jim!!! I donΒ΄t get the error when i put the iconv.dll in the plugins folder.
But i cannot find how to start the webdialog... is not on plugins.. tools... nowhere?Thank you again,
Daniel S -
Daniel,
It should be in the Plugins menu:
-
Not in my plugins menu..
Perhaps is because i have not installed the full Ruby languageDaniel S
-
@daniel s said:
Not in my plugins menu..
Perhaps is because i have not installed the full Ruby languageDaniel S
The iconv.dll and iconv.so files are used for converting or translating strings. I think if you edit the convert.rb file in the RO folder you can make it work.
#require "iconv" def sutool_convert_string(s) # Iconv.iconv("GB2312//IGNORE","uTF-8//IGNORE",s)[0] s end
-
Thank you Jim!!!! Now is working!!!
And i try removing the iconv.dll and works too... the problem was the convert.rb code.
Now i have to see how to add the plugins
Thank you again!!
Daniel SEDIT: the iconv.dll is needed.. if you open more than one sketchup it pop-up a msg. With the .dll in the plugins folder all works fine.
-
This plugin is really good for all those "other", infrequently used plugins you use.
You can create any number of dropdown menus. The menus are controlled by .ini files - one for each menu.
In the SuTools folder there is a sub-folder named "ini" Inside are the files that the plugin uses to create each menu. Each ini file start with a 2-digit code - the code goves the order of the menus in the plugin dialog. The 2-digit code is followed by the menu name.
01SelectTool.ini 02FaceTools.ini ...
Before you begin adding plugins, you can create your own personal menu list. Just create a new, blank file using the ##Name.ini code.
When you reload SuTools plugin, your menu will be available.
-
Hem hem, I can't read chinese...
-
-
V0.08 has corrected two bugs that cause SUTool loading error.
Now,SUTool window can remembers it's size and positionοΌThank to JimοΌ -
Jim,
Been try to decipher this thread. Looks like a convenient way to organize/reorganize scipts.
Would you mind summarizing "how" this works (in general terms), how to install and modify?
J
-
I'm working on a tutorial now... and here it is. I hope it's good.
-
Hi Wikii! This is just what I've been wishing for! Great work! Thank you!
Sorry to write with a problem...
I downloaded this: SUTool_v0.08en.rar
It seems to load just fine, but I get this...
-
@fletch said:
Hi Wikii! This is just what I've been wishing for! Great work! Thank you!
Sorry to write with a problem...
I downloaded this: SUTool_v0.08en.rar
It seems to load just fine, but I get this...
Just try to click "SUTool Rebuild" in plugins menu~
-
Hi Wikki, that worked... and I could have SWORN I tried that very thing last night, but it didn't work.
Jim, you're tutorial was the perfect thing for a guy like me! Blessings upon you a thousand times!
-
ok... don't hate me!
I started loading my rubies...1st - Jim, there's an easier way that Wikki provided for us to create new menu items instead of manually creating the ini file, you just add new ruby and give the new menu group item a name. I really like it! Maybe just add that in your tut.?
2nd - Wikki, when a name is very long for the ruby script description, the box cuts off the name of the file... so you almost can't tell what it is in some cases. If possible, do you think in the future you will be able to make it so that when you re-size the window it will also re-size the rectangles to show the whole ruby name?
-
@fletch said:
2nd - Wikki, when a name is very long for the ruby script description, the box cuts off the name of the file... so you almost can't tell what it is in some cases. If possible, do you think in the future you will be able to make it so that when you re-size the window it will also re-size the rectangles to show the whole ruby name?
PLZ,edit SuTool.css file to resize the width of cmd button that been showed in SUT window.
-
ok, Wikii, thx!
got a screenshot of the exact place/way I would do this? (I'm no programmer! )
Advertisement