ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
  • Ruby WebDialog that invokes a Java Calculator Applet

    10
    0 Votes
    10 Posts
    890 Views
    fredo6F
    @plot-paris said: for example, I copy(move) an object and type in the distance (lets say 50), then hit enter. but if I want to move it only one third of the distance I just type in 50 / 3 and the object is moved one third of 50. the same could work when drawing geometry like a line. The only problem with the VCB is that it does not work when you have decimalsin the numbers For instance, if your unit is Centimeters and you type in the Line tool: "50.0/3" will give 3 cm "50.0/3.0" will give 50 cm It's not very complex to supersede this in Ruby, but the trick is that you have to convert numbers to Float first. Otherwise, 50/3 will simply give 16, not 16.67. You can try in the Ruby console. So a straightforward #Eval() won't make it. I had to do it in my script PlaneShear for entering angles (in degrees, radians or as a tangent value)
  • Finding unit of drawing in options

    8
    0 Votes
    8 Posts
    747 Views
    M
    @fletch said: j'espere que ne te casse pas les pieds, Matt666! No !! @unknownuser said: I believer Matt Frenglish is trying to ask how to get the units of the drawing. absolutely! @unknownuser said: Frenglish @unknownuser said: Then, try this def get_current_unit () case Sketchup.active_model.options[0][2] when 0 return "inch" when 1 return "feet" when 2 return "mm" when 3 return "cm" when 4 return "m" end end Thank you !!
  • Online multiuser translating

    4
    0 Votes
    4 Posts
    527 Views
    BepB
    @jim said: I know of 2 solutions for translating plugins: SketchUp ships with langhandler.rb in the Tools folder. Fredo6 has his LibTraductor.rb Or did you mean to make translations for SketchUp, not SketchUp plugins? Hallo Jim, What I meant was to have a possibility to let the Sketchup users translate the whole UI of Sketchup. It is possible in the Genopro program I mentioned in my first post.(check it out) It took 6 month to translate the user interface of this program for a great percentage, into more than 30 languages, mainly by the users of the program themselves. I came up with the idea, when I noticed that you where working on ''Custom toolbars'' and ''common UI API'', I thought that maybe this would be the best time to come up with this idea, so you could already incorporate this functionality or a part of it, into the ruby’s you are making. So perhaps the tooltips of the custom toolbars could already be translated. About the custom toolbars your making possible could you incorporate a function. that with a right+click on the tool button the help file of this tool would open. Incorporate in your rubyl the making of the tool-shortcuts. Make fly-out toolbars possible as a choice . To all developers ,thanks for shearing all your great ruby's Greetings, Bep van Malde.
  • Windowizer problem in groups

    3
    0 Votes
    3 Posts
    331 Views
    R
    What version of Windowizer are you using? If it isn't 3.0, get it from Smustard.
  • Common UI API

    12
    0 Votes
    12 Posts
    1k Views
    tbdT
    plot-paris: possible. is what Adam referred with radial menu
  • Ruby script development

    7
    0 Votes
    7 Posts
    817 Views
    C
    @unknownuser said: Chunky Bacon. Ok. This is seriously out there. Seriously. Thanks for the reference. While reading this little ditty, I found the Ruby Bride and the RDE, which I will try out. Chunky Bacon.... chris
  • Sun Paths

    3
    0 Votes
    3 Posts
    693 Views
    R
    I have SunStudy on my to-do list. There are some similar things out there, though.
  • Closing a WebDialog

    4
    0 Votes
    4 Posts
    648 Views
    Al HartA
    Thanks, I have mine working now as well.
  • FILE CONVERSON from SU to Algor

    6
    0 Votes
    6 Posts
    3k Views
    JClementsJ
    Ian, thanks again for putting things in perspective. Your info will be helpful in communicating with the fabricator. Regards, John
  • View hidden geometry toggle icon

    6
    0 Votes
    6 Posts
    1k Views
    J
    I've split the Custom Toolbars discussion off to a new topic: http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=10041
  • Subdivide and smooth not showing up ?

    4
    0 Votes
    4 Posts
    783 Views
    J
    Simple as that thanks
  • Sketchup's API and Ruby

    5
    0 Votes
    5 Posts
    1k Views
    A
    To share, this is a post i found about it (by cphillips) Additionnal stuff: http://www.suwiki.org/suwiki/index.php?title=Ruby_Tutorial_-Dialog_Boxes_and_WIN32API%28Advanced%29 the Win32API.so link below wont work you can get Win32API.so from there After you install ruby into a folder, say c:\RUBY, then Win32Api.so will be in c:\RUBY\lib\ruby\1.8\i386-mswin32 the original post: http://groups.google.com/group/Ruby-API/browse_thread/thread/52ade11766148a57 -The function is called "cleanSlate()". -It will remove all the menus and the window boarder. -You need to manually disable any toolbars you dont want. -Requires win32API.so lib(attached). NOTES: -It works by looking for a window named "Sketchup - Untitled". Therefore it will only work when no model is loaded. You could change this by editing the ruby. -It wont fully work at startup because the "Plugins" menu gets created after the cleanSlate() function is run. Enjoy Chris http://groups.google.com/group/sketchup-Pro-Groups/web/win32API.so http://groups.google.com/group/sketchup-Pro-Groups/web/cleanSlate.rb <code> require "sketchup.rb" require "Win32API" def cleanSlate() #setup win32 calls. findWindow=Win32API.new("user32.dll", "FindWindow", ['P','P'], 'N') sendMessage=Win32API.new("user32.dll", "SendMessage",['N','N','N','P'], 'N') getMenu=Win32API.new("user32.dll", "GetMenu", ['N'], 'N') getMenuItemCount=Win32API.new("user32.dll", "GetMenuItemCount",['N'], 'N') getSubMenu=Win32API.new("user32.dll", "GetSubMenu", ['N','N'], 'N') deleteMenu=Win32API.new("user32.dll", "DeleteMenu", ['N','N','N',],'N') drawMenuBar=Win32API.new("user32.dll", "DrawMenuBar", ['N'], 'N') setWindowLong=Win32API.new("user32.dll", "SetWindowLong",['N','N','N'], 'N') #find the sketchup window pw=findWindow.call(0,"Untitled - Sketchup") #remove the menu menu=getMenu.call(pw) while(getMenuItemCount.call(menu)>0) menu=getMenu.call(pw) deleteMenu.call(menu,0,0x400) drawMenuBar.call(menu) end #force the layout to update. sendMessage.call(pw,0x0047,0,"") #remove the window boarders setWindowLong.call(pw,-16,0x00800000|0x10000000|0x00080000|0x00040000) end </code>
  • Can a non-repeating (non-tiling) texture be produced?

    8
    0 Votes
    8 Posts
    10k Views
    GaieusG
    Yes, you definitely need to separate the geometry from the rest of the tube. If you paint the rest with the same colour you have in the outside of the logo part (white in this case), you can smooth the surrounding lines later; the image will stay separated.
  • Maybe a stupid question...

    8
    0 Votes
    8 Posts
    694 Views
    I
    i was wrong about "applyTo"(multiple ex/change)...it works, "applyTo" + Emmanuel's "select component instances"... need simple [web]dialog to get it features as api
  • Help~ color to layer ruby?

    2
    0 Votes
    2 Posts
    365 Views
    Didier BurD
    Hi, I think the script "layers_materials.rb" will help you. What it does: "Manages layers and materials as the "color by layer" display mode does. 4 options to create layers or materials corresponding with materials and layers, to repaint faces based on their layer or to change their layer based on their materials." Download it here: http://www.crai.archi.fr/RubyLibraryDepot/Ruby/em_ren_page.htm Hope this helps
  • Hideedges script - Right Click Context

    4
    0 Votes
    4 Posts
    597 Views
    W
    Dear Azuby, I have just had an opportunity to try out your script. Perfect!!! I like the undo hide-edge function too, and the right-click context menu is just SO HANDY. I use your script for cleaning up model elements. Suppose I am modelling an object with a 6-fold symmetry about the z-axis say. I model the object and then take a 1/6 slice, make it a component, and then rotate it about the z-axis. Using your Hide Edges script, I can click on the two bounding faces to hide the edges, then delete the faces before rotating. This saves a lot of time with the Eraser tool + shift, even in wire-frame mode. Thanks once again. Regards, Bob
  • Push pull selected

    9
    0 Votes
    9 Posts
    817 Views
    GaieusG
    @cadfather said: yes, but only if you already have extruded faces... True - you cannot do this with 2D geometry.
  • Rotate camera view by set degrees

    7
    0 Votes
    7 Posts
    907 Views
    G
    Site is back up for the link I posted a few days ago.
  • Deleted scripts refuse to disappear in Vista

    3
    0 Votes
    3 Posts
    1k Views
    TIGT
    This is a Vista security problem - you need to have Admin rights and you can then delete, add and change files from within the Program Files folder structure. Otherwise you get 'compatibility file issues where things seem to change but when you look later they are back - or the old version !
  • Ruby Idea: Bones for animating characters

    15
    0 Votes
    15 Posts
    1k Views
    R
    gata, I hear you A couple of things you mentioned were already on my list, but it's good to hear from script users to verify/validate/change my ideas on what a script needs.

Advertisement