Mac User? | Join the Rayscaper Beta for Mac Learn More

Alkategóriák

  • No decscription available

    20 Témakörök
    462 Hozzászólások
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • Ruby challenge 2 ?

    18
    0 Szavazatok
    18 Hozzászólások
    3k Megtekintések
    M
    WHOA, So I have to give a try to the free versionof SU7, but, I think my computer will begin to say ARRGHH... (quite old... )
  • Help with Copy Along Path....

    13
    0 Szavazatok
    13 Hozzászólások
    1k Megtekintések
    C
    Done in 4 pcs.... [image: hose.jpg]
  • REQ: ANother camera

    31
    0 Szavazatok
    31 Hozzászólások
    3k Megtekintések
    O
    hey guys.. you think that i'm crazy??
  • Joint Push Pull Question

    2
    0 Szavazatok
    2 Hozzászólások
    416 Megtekintések
    ToboboT
    I think Fredo6 is the best to answer this question. I would post it here http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=6708&st=0&sk=t&sd=a&hilit=joint+push+pull
  • Sketchup game

    3
    0 Szavazatok
    3 Hozzászólások
    634 Megtekintések
    chrisglasierC
    @dhruv said: How can I load different .skp files to my game from webdialogue?(I want to do this cause I dont want to go every time to drop down menu from plugins and load the map) Not truly professional I'm sure but this works #RUBY @dlg.add_action_callback("load") {|d, p| a= p.split(",") subDir ="Components/NamesetComponents/" fileName = a[0]+".skp" model = Sketchup.active_model entities = model.active_entities theX = Integer(a[1]).mm theY= Integer(a[2]).mm theZ = Integer(a[3]).mm point = Geom;;Point3d.new theX,theY,theZ txyz = Geom;;Transformation.new point path = Sketchup.find_support_file fileName, subDir definitions = model.definitions componentdefinition = definitions.load path instance = entities.add_instance componentdefinition, txyz theDegrees = Integer(a[4]).degrees theAxis = a[5] rv = Geom;;Vector3d.new(0,0,1) if theAxis == "z" rv = Geom;;Vector3d.new(0,1,0) if theAxis == "y" rv = Geom;;Vector3d.new(1,0,0) if theAxis == "x" tr = Geom;;Transformation.rotation(Geom;;Point3d.new(instance.bounds.center), rv, theDegrees) instance.transform! tr } //JAVASCRIPT function loadSkpFile(){ param = new Array(theFile,theX,theY,theZ,rz,theAxis) param = param.join(",") window.location.href = 'skp;load@'+param } @dhruv said: How can I open a web - browser by left clicking on the model? (Something like onclick function from maybe dynamic components) As I understand it, you can do it with a selection observer, but I haven't figured out the code for that. Hope this is useful. Chris
  • WebDialog crashes Sketchup

    5
    0 Szavazatok
    5 Hozzászólások
    790 Megtekintések
    A
    Hm OK, you see me surprised. Till now I have used an HTML code similar to the following for my "Update" button: <input type="button" onClick="javascript&#058;window.location = 'skp;foo@'; return false" value="Update"> After I changed it to: <input type="button" onClick="javascript&#058;window.location = 'skp;foo@bar'; return false" value="Update"> Sketchup doesn't crash any longer. puts "Well, and now I'll clean up my Ruby code." what the f... =begin azuby =end
  • Is it possible...

    7
    0 Szavazatok
    7 Hozzászólások
    1k Megtekintések
    TIGT
    @whaat said: Is it possible to enter 'component edit mode' with Ruby? Is it possible to prompt the user to browse for a file folder (not a file)? If not, consider these requests for the next service release of SU. Thanks. I used a trick to edit groups [PC only] - components could be done similarly... require 'sketchup' require 'win32ole.so' def edit_group ### an example of access SUp tools not otherwise available... ### make shortcut here if NOT set already = ctrl+alt+shift+G ### check that you have one group selected and if so do this... WIN32OLE.new("WScript.Shell").SendKeys("+^%{g}") end#def ### run it from within other tools ### the menu here for test only... if(not file_loaded?("edit_group.rb")) UI.menu("Plugins").add_item("Edit Group"){edit_group} end#if file_loaded("edit_group.rb") ### This is how I find a directory - you do need to pick a file in it though... require 'sketchup.rb' #----------------------------------------------------------------------------- def materialimporter model= Sketchup.active_model materials= model.materials model.start_operation ("Import Materials") ###undo - see commit at end pwd= Dir.getwd.split("/").join("\\")+"\\" ### fix for SU drctry= UI.openpanel "To Pick this Directory; Pick Any Image File + OK...", pwd , "*.???" return nil if not drctry drctry= File.dirname(drctry) return nil if not drctry cwd= Dir.chdir(drctry) images= Dir["*.{jpg,png,tif,bmp,gif,tga,epx}"]### for all supported image file types for image in images imgname= image.split(".")[0..-2].join(".") ### removes .jpg etc from end mat= materials.add(imgname) mat.texture= image end#for image### model.commit_operation ###undo all if needed end#def### .
  • Selection

    3
    0 Szavazatok
    3 Hozzászólások
    469 Megtekintések
    R
    Thanks for the reply, but I still can't get it to work. #This works when I select everything with a mouse #I have the transform "t" defined elsewhere model = Sketchup.active_model.selection Sketchup.active_model.active_entities.transform_entities t,model ...... #I tried this to select everything without the mouse, but it does nothing model = Sketchup.active_model.selection.add(Sketchup.active_model.entities) Sketchup.active_model.active_entities.transform_entities t,model
  • Req script to draw squares by specifying the area

    6
    0 Szavazatok
    6 Hozzászólások
    808 Megtekintések
    T
    I have a tile maker.rb file I created. It can be used to make cubes of uniform dimensions of a selected area. I don't know if this tool would be helpful for what your are describing. attached is a short wmv file. tile.wmv
  • Save as sketchup v6

    6
    0 Szavazatok
    6 Hozzászólások
    744 Megtekintések
    thomthomT
    @cheffey said: I'm not sure how long it will be until we switch to 7, due to the economics of our industry. Will the free version of 7 work ok installed alongside the Pro version of 6? Yes.
  • Help! Ruby and Sketchup information required!!!

    3
    0 Szavazatok
    3 Hozzászólások
    496 Megtekintések
    R
    I'm willing to help in any way I can, but I don't know of many articles or publications about customizing SketchUp via Ruby. I've done my share of scripting, but I just don't know of much written about what we rubyists are doing. There are some discussions on the old SU ruby forum (and some here) that get into some technical issues, but I don't know if that will meet the criteria for the types of sources you need. Feel free to contact me through Smustard if you have any specific questions. If I can, I'll be happy to help.
  • Scaling

    2
    0 Szavazatok
    2 Hozzászólások
    380 Megtekintések
    Dave RD
    Now that would be an interesting plugin. Just think of being able to download all those models folks have drawn and uploaded to the warehouse without bothering to draw them correctly. Good luck with this.
  • Web dialog import/export

    3
    0 Szavazatok
    3 Hozzászólások
    1k Megtekintések
    chrisglasierC
    That sounds interesting. Do you know of any better reference material, the one you tagged is mainly just headings. Please let me know if you have a moment to spare. Chris
  • Full ruby documentation for SU7?

    2
    0 Szavazatok
    2 Hozzászólások
    456 Megtekintések
    R
    I think its currently being updated, you should be ale to find it here when its finished: http://code.google.com/apis/sketchup/
  • Right click suppression

    3
    0 Szavazatok
    3 Hozzászólások
    481 Megtekintések
    R
    Well.. it looks like I need a ruby-predator that would kick others out.)
  • Review entity count per group/comp?

    3
    0 Szavazatok
    3 Hozzászólások
    537 Megtekintések
    chrisglasierC
    Quite a different topic but have a look at the bit of code in this post: http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=14299 As it walks through the groups and components, I guess you only need to add some code to count the faces and edges of each. Outputting to a webdialog would be good so that you could use some javascript to list rogues as links so you can identify and fix them one by one*. I would be interested to find out if this approach turns out to be useful. Chris edit: or in batches of same problem
  • [Help]How to get the path where SU6 is installed?

    3
    0 Szavazatok
    3 Hozzászólások
    385 Megtekintések
    fredo6F
    Wikii in Ruby, use Sketchup.find_support_file "" Fredo
  • Advanced Ruby Sketchup

    2
    0 Szavazatok
    2 Hozzászólások
    401 Megtekintések
    D
    Oh , I just saw Scott did upload his script, anyways we can have general discussions for developers around and feedbacks of what can be done further with this kind of simulation. Cheers, Dhruv
  • Is there a "copy-multiple" ruby...

    11
    0 Szavazatok
    11 Hozzászólások
    2k Megtekintések
    R
    Sorry I don't know about 5 or know of ruby but if its anything like 6 with copy and paste - Select the object to copy Choose an insertion point with the move tool. (don't worry when the object moves as you move the curser to select copy, because after using copy and then holding down Ctrl+V the original one appears back in it original position) Copy object or you could use Ctrl+C Then Holding down the Ctrl+V keys when pasting you get multiply copies to paste were you want, with a insertion point. EDIT SEE MY POSTS BELOW TO CHANGE INSERTION POINT
  • Ruby PC > MAC

    3
    0 Szavazatok
    3 Hozzászólások
    417 Megtekintések
    J
    Hi Todd Thanks for your info - I will try it out.

Advertisement