@tig said:
WikiiI see what you me - buggy...
However it WILL work when scripted...
I hope it works in different scritps,means that two scripts can add items to a same submenu.
@tig said:
WikiiI see what you me - buggy...
However it WILL work when scripted...
I hope it works in different scritps,means that two scripts can add items to a same submenu.
@tig said:
Use
$wikii_submenu=UI.menu("Plugins").add_submenu("Wikii")
then later
$wikii_submenu.add_item("Print 1"){print 1} $wikii_submenu.add_item("Print 2"){print 2}
Thank you,TIG!
But,it does not work when I copy it to Ruby Console line by line.
Only "Wikii" has been added to plugins menu.
"print 1" and "print 2" do not show.
I just want to add all my plugins to one submenu.
I use a global variable to store the submenu.but it does not work.
Is there a way to add defferent plugins to one submenu?
amenu=UI.menu("Plugins").add_submenu("Test")
amenu.add_item("print 1"){print 1}
I Run each line of the codes in Ruby Console , Only a submenu "Test" has been added in plugins menu."Print 1" does not show in the submenu "Test".
If I save the codes in a rb file and load it in Ruby Console,submenu "Test" and "Print 1" will be shown correctly.
why?
Version:0.08
Freely use forever
@blajnov said:
Button.
Thank you, urgen and AlexMozg ...
Everything in the archive is thrown into PLAGINS, open the program ---\view ----\toolbars ----\universal manipulator Wikii.
It is a beautiful icon.
Version:0.07
Add background color to ruler
Drag handle with Alt key to force move/scale in other two direction.
This free version can work before 2011.
@gavvy said:
:thumbd: I hate this plugin.
You hate Sutool?
Do you really know what Sutool is?
Sutool is just a plugin that can manager others.
User can add other plugins in to it. And ,Sutool provides several ways allow user to access them.
Menu,Toolbar,Popmenu,Sutool panel,Short cut, Multi_Key short cut.
Again, Sutool is just a plugin,not a package of plugins!
Is there a way to get the large_icon or small_icon of an instance of UI::Command?
cmd = UI;;Command.new("Tester") { UI.messagebox("Hello World") }
cmd.small_icon = "ToolPencilSmall.png"
cmd.large_icon = "ToolPencilLarge.png"
command.large_icon does't work!
I have try to modify the instance_method "large_icon=" of UI::Command in a rb file like "c:/Command_.rb".
module UI
class Command
attr_reader ;large_icon
alias_method ;old_large_icon=,;large_icon=
def large_icon= (fn)
@large_icon=fn
old_large_icon=(fn)
end
end
end
It works .
But tool button will be shown without icon if program uses relative path to the icon file.
Like sandboxmenus.rb in "C:/Program Files/Google/Google SketchUp 7/Tools/Sandbox".
#a segment of sandboxmenus.rb
cmd = UI;;Command.new($tStrings.GetString("From Scratch")) { Sketchup;;active_model.select_tool FromScratchTool.new }
cmd.small_icon = "Images/tbFlatTerrainSmall.png"
cmd.large_icon = "Images/tbFlatTerrainLarge.png"
It seems that "Images/tbFlatTerrainSmall.png" is treated as "c:/Images/tbFlatTerrainSmall.png" instead of "C:/Program Files/Google/Google SketchUp 7/Tools/Sandbox/Images/tbFlatTerrainSmall.png".
if( not $terrain_CreateFromContours_loaded )
cmd = UI;;Command.new($tStrings.GetString("From Contours")) { Sketchup;;active_model.select_tool FromContoursTool.new }
cmd.small_icon = "Images/tbContoursSmall.png"
cmd.large_icon = "Images/tbContoursLarge.png"
cmd.tooltip = $tStrings.GetString("From Contours")
cmd.status_bar_text = $tStrings.GetString("Create a Sandbox from contours")
cmd.menu_text = $tStrings.GetString("From Contours")
$draw_terrain_submenu.add_item(cmd)
tb.add_item(cmd)
$terrain_CreateFromContours_loaded = true
end
This is a section of code in "sandboxmenus.rb" file.
It works well!
But,I do't understand this line
small_icon = "Images/tbContoursSmall.png"
Both the "images" folder and itโs upper folder,"Sandbox", are not in the searching path!
How could Sketchup find the img file?
Does sketchup find file in every sub folder in searching path?
Following ruby code works PC.
system("taskkill /im sketchup.exe /f")
Thank you!
I tested it.As what you say ,when sketchup initialize , my rb files can add themself to the same submenu.
My target is adding every plugins that I wrote to a certain sub_menu.
I try to add codes as below to every rb files.But it sames that only the first loaded rb file can add item to the menu correctly.
if !$my_menu
$my_menu=UI.menu("Plugins").add_submenu("My_Tools")
end
$my_menu.add_item("some_string") { some_code}
I test following code in a rb file.It works well.
a_menu=UI.menu("plugins")
a_menu.add_item("print") { p "1"*10 }
But when I run each line of following in Ruby Console.It does't work at all!
a_menu=UI.menu("plugins")
a_menu.add_item("print") { p "1"*10 }
It is a puzzle to me.
Version:0.08
Freely use forever
Version:0.07
Add background color to ruler
Drag handle with Alt key to force move/scale in other two direction.
This free version can work before 2011.
Version:0.05
Select a group or ComponentInstance as object to be Operated.
Drag a handle:scale/rotate/move object in one direction
Drag central handle:Scale
Alt+Shift: toggle Local / World Coordinate
Drag : move object freely
Double click on handle:scale/rotate/move object with value that you input through a dialog box
Shift + Double click:repeat last edit
Alt+click:change the center of axis
Click on other group or ComponentInstance:change object to be Operated
Alt+Drag:force to move object freely
This free version can work before 2010.
Sutool allow user use several_keys as a shortcut , also allow user press a key to load last used tool.
@unknownuser said:
you pass from rbs to rb
So I can put your crazy plug in the Tools menu! Thx!
Seems there is yet a lilbug
if I incline & rotate the curve to the ground that works
there canโt has vertical segment in the path.
for the reason? you think it.