⚠️ Important | Please update Libfredo to v15.1a for bugfixes associated to SketchUp 2025 and below Download
  • [Ruby doc] .materialType method

    8
    0 Votes
    8 Posts
    1k Views
    T
    It is sad. So maybe SU SDK could help, but it isn't within my abilities to play with it. def SU2KT;;texture_distorted?(e,mat,mat_dir) distorted=false temp_tw=Sketchup.create_texture_writer model = Sketchup.active_model entities = model.active_entities model.start_operation "Group" #For Undo group=entities.add_group group.material = mat g_handle=temp_tw.load(group) temp_handle=temp_tw.load(e,mat_dir) entities.erase_entities group Sketchup.undo distorted=true if temp_handle!=g_handle temp_tw=nil return distorted end Here is what I am doing in SU2KT, but it is slow, memory consuming and dirty. Btw. Todd - have you noticed that .materialType doesn't change from 2 back to 1 if a material is not longer colorized. Am I correct? Thanks Tomasz
  • Plugins Folder

    6
    0 Votes
    6 Posts
    736 Views
    J
    Gotcha. That's why some of the icons were not at first showing up, I'd left them in their parent folder in the original Ruby folder. Now hat I've moved the parent into Plugins, they work. If anyone can follow that convoluted English. I've also discovered the embedded tutorials, usually in the Directory folder, which certainly help— they include explanations of where the files go. What a great contribution these coders are making to Sketchup. This explains how a lot of effects are generated. Thanks, folks. Jim
  • Context menu and PipeAlongPath.rb

    4
    0 Votes
    4 Posts
    600 Views
    kenK
    TIG Thanks for the quick reply. Not sure where I got the script that is modified. I know I am not capable of modifying the script. I tried you new code, and still have the same results. Thanks for your help. Ken
  • Plugin for Mortise and Tenon Joints

    2
    0 Votes
    2 Posts
    857 Views
    J
    Thanks Clark. I copied this to the Ruby Forum so more people will see it.
  • Plugin question. updating plugins.

    4
    0 Votes
    4 Posts
    374 Views
    jujuJ
    for scripts that you bought from Smustard you could download their "MySmustard" plugin which will check the installed (paid/bought) plugins against your account. It's the easy way of always being up to date.
  • Geom point_to_polygon_2D - does it exist

    3
    0 Votes
    3 Posts
    270 Views
    B
    Thanks Todd I just checked the docs and I should have looked a bit closer rather than doing a straight copy. A bit of word blindness going on - my apologies.
  • Add an object to the selection based on a attrib.

    4
    0 Votes
    4 Posts
    321 Views
    T
    This is no book for Ruby in SketchUp, per se. There are Ruby books and there are SketchUp books. The book I use as a reference for Ruby is called the Pickaxe book. An older copy is available online here: http://phrogz.net/ProgrammingRuby/frameset.html Todd
  • (REQ) random component spray confined inside polyline (face)

    2
    0 Votes
    2 Posts
    498 Views
    GaieusG
    Well, let MEbe the first to kick your @ss http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=6913&hilit=Plugin It does even morethan you wish.
  • Component/Group from Layer/Material?

    12
    0 Votes
    12 Posts
    849 Views
    R
    Okay, hopefully I can get the observer written and working next week.
  • Coming Soon: Reload Textures

    11
    0 Votes
    11 Posts
    1k Views
    R
    Here's the situation: When you bring an image into SketchUp for use as a texture, a Material object is created. That object stores the original path to that texture file, so a location already exists. The free version will look in that stored location for reloading materials, and will reload it if it exists. The pro version will let the user specify a folder to search for matching file names. I had not thought about this too much before, but I suppose each texture could be given a specific replacement. That would not be as fast for the user if they chose to do that, but it would be more flexible. The fastest/easiest way for the user would be to specify a folder for replacements. Any need for exporting the images in a model to a folder? I know something exists that does that, but it could be added in...
  • 20 ruby's you can't live without

    22
    0 Votes
    22 Posts
    4k Views
    F
    1 - make faces 2 - extrude lines up, extrude lines using 2 points, etc... all them extrude lines commands. 3 - Windowizer (creates a curtainwall) 4 - select all instances - is that a ruby, or built-in... I forget now... 5 - Joint Push Pull (for push-pulling curves) 6 - pushpull face in any direction (using 2 points), and other pushpull face commands... along normal, along Z, etc. 7 - stair generator 8 - SU2KT (SketchUp 2 Kerkythea) 9 - Proper Animation - (great for showing diff. options for furniture, or doors swinging open) 10 - Scene Exporter pro - once get used to having it... can't live without. 11 - Automated 2D Output 12 - Mirror Selection 13 - Deselect Edges (Deselect Faces) - I think these are rubies... 14 - Offset on surface (and tools on surface) 15 - Purge (this should be number 2) 16 - Layers and Materials plugin by Didier Bur 17 - Intersect overlapping lines 18 - Selection Memory 19 - Soap Skin Bubble 20 - Protrude (closest thing we have to greeble plugin for SU)
  • WebDialogs with Windows Vista

    3
    0 Votes
    3 Posts
    350 Views
    daikuD
    The other bug I've noticed with Vista has nothing to do with ruby, but with dialogs in general: http://www.sketchucation.com/forums/scf/viewtopic.php?f=11&t=10719 Not sure if it's affecting your web dialogs. CB.
  • Group/Component Edit Mode and Ruby

    2
    0 Votes
    2 Posts
    362 Views
    R
    nope. I've asked Google for this possibility. We'll see...
  • Get_element_value - not returning anything

    2
    0 Votes
    2 Posts
    308 Views
    J
    a SPAN does not have a value. If there is no other HTML in the span, then you can get the contents by innerHTML. I am not sure if using the WebDialog method "get_element_value" will work in this case. // javascript var txt = document.getElementById("TestElement").innerHTML
  • Ruby Tutorial: How to create and add a component from Ruby

    15
    0 Votes
    15 Posts
    8k Views
    T
    Its one of the things I have not been able to resolve. I will give your suggestion a try, in the near future. thanks!
  • Drawingelement.material and face.back_material? [SOLVED]

    5
    0 Votes
    5 Posts
    456 Views
    P
    thank you very much
  • IES VE plug-in launched

    3
    0 Votes
    3 Posts
    578 Views
    jujuJ
    Hi Cameron, welcome to SCF. I'm sure that link was posted here on the SCF on about the 27th August 2008. Never-the-less, good to see people contributing. +++ EDIT +++ I found the thread posted before.
  • How are you creating Webdialogs?

    7
    0 Votes
    7 Posts
    586 Views
    chrisglasierC
    @cphillips said: Chris, I like that UI. The animation is a nice touch. You don't use any libraries for creating the HTML from JavaScript? Thanks, I introduced the animation because the redisplay was so damn quick, it was confusing, particularly going backwards (left). Now I think it is good because it shows the interface is a machine in its own right, not a metaphor for paperwork. From the other post, you will see I'm a builder; I find my tools not at the library but at the builders' merchants! Chris
  • Namesets and bounding boxes

    17
    0 Votes
    17 Posts
    2k Views
    chrisglasierC
    @morisdov said: It would be nice if you can clearly and simply explain what is the problem your solution solves. Well I will try but maybe you don't see the problem as a problem! What you are doing is helping Sketchup modelers, what I am trying to do is to help John and Jane use Sketchup models to ease their daily toil (an idea relevant to this forum and good for modellers I think). At http://www.ted.com/index.php/talks/kevin_kelly_on_the_next_5_000_days_of_the_web.html Kevin Kelly explains that the Web used to be about linking computers, now it is linking pages but it is gradually restructuring to link data. Data belongs to physical things. And physical things can be represented by models. Not everyone needs models to do their work, but generally models are helpful, essential in a design where nothing else but a site and ideas exist. Ideas for things like baths can be represented by nouns, their generic names but they only become recognisably unique and useful when they have an address and some functionality; that is what a nameset gives them. If you believe data linking is the future (consider where Google is going before dismissing) then data must be accessible to all. In this case, it is crazy to enter a value in the VCP, if the only way to extract it is by using an exporter and passing it to "die" (unclickable) in an Excel cell. What would be good is a Sketchup method to trap such data and store it directly in plain text so that it can be automated to link up with other data on the Web, for example, a building design stored essentially as links to building products + their xyz's. @morisdov said: Components are organised in standard component libraries - your solution adds an [color=#008080][b]additional hierarchy tree to organise components ? A nameset does not add anything to Sketchup except the dialog with a few callbacks. It provides its own separate hierarchies by assembling names associated with specific tasks (one of Gaieus' digs perhaps). The association can be physical, temporal and so on, or a combination as a nameset can have devices to link and cross link. If the association is physical, the names can be used to pick up models and position them, if temporal the models can be animated. @morisdov said: Other 3D CAD tools have extensive RDBMS systems linked to them, decades old legacy and enrichment. Sketchup came very late to this party and it will not compete with the old monsters. Gee come on. This sounds like the senator who raved that man would not enter space until the next century (the year before Gagarin did), or the "toy" personal computer and monster mainframe, or hundreds of others similar. I never imagined you as a stick-in-the-mud. Please don't take offense, I am happy to discuss such things with you Chris
  • Ruby (or other way) to subdivide for displacement

    8
    0 Votes
    8 Posts
    1k Views
    C
    SketchyFFD does subdivide (well it really dices the model) and you can use it without using the FFD. It should preserve texture coords as well.

Advertisement