🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
  • The results of "line.strip"

    3
    0 Votes
    3 Posts
    267 Views
    honoluludesktopH
    Tom, Thanks, I previous looked at that page, and tried to correct my code, but couldn't make it work. Guess it's another case where I am asking the wrong question. It's late, I will take another stab at it tomorrow. Except for speed, parsing, layers, block names, and nested blocks the plugin is (beta) usable. [image: Mkj1_temp09.jpg] This is a import of a Dxf file. The coding is very basic, but modular enough to add other Dxf features in the future.
  • Different styles

    3
    0 Votes
    3 Posts
    304 Views
    D
    mm. a shame. would be good to ask the google team to enable this option. no? thanks for replying
  • To space or not to space ".add_circle[@entity[0]...."

    3
    0 Votes
    3 Posts
    227 Views
    honoluludesktopH
    OK, thanks.
  • Create a group and manipulate add geom

    11
    0 Votes
    11 Posts
    959 Views
    S
    Perfect I made a stupid mistake I investigate not thanks a lot
  • Down to Top traversal

    6
    0 Votes
    6 Posts
    322 Views
    thomthomT
    Yea - you'd need to keep store the path to where you found the group in the first place.
  • Running SketchUp with command line redirection

    14
    0 Votes
    14 Posts
    3k Views
    Al HartA
    All this work trying to redirect output led me to come up with a ruby script which will redirect output, and flush the output file. See: http://forums.sketchucation.com/viewtopic.php?f=180&t=31160
  • How to add entities to a nested group?

    32
    0 Votes
    32 Posts
    2k Views
    D
    YAY! Thanks a ton thomthom, your solution works.
  • UI.messagebox "beep"

    20
    0 Votes
    20 Posts
    1k Views
    thomthomT
    @runnerpack said: @thomthom said: Use the bitwise And operator to combine flags: Messagebox with Yes/No button and question mark icon: UI.messagebox('Hello World', MB_YESNO | 32) That's actually the Or operator... but you knew that Doh! I swear there's a little brain-gnome that intercepts and swaps words before they reach the hands...
  • UI.savepanel & SU6

    2
    0 Votes
    2 Posts
    223 Views
    thomthomT
    UI.savepanel "Test", "C:/Test/", "test.tmp" This also returns nil in SU6.
  • Layer color by ruby-code?

    16
    0 Votes
    16 Posts
    1k Views
    A
    @thomthom said: I see an issue with this method: It has multiple .start_operation and commit_operation inside the code flow - which will interfere with any start_operation you started yourself - since SU doesn't handle nested start_operations: ` model.start_operation ... layer.color = 'red' # this breaks the undo stack ... model.commit_operation` Though, it is not related to the error you got. Sorry, I don´t understand that. I tried now that: def layer_color model = Sketchup.active_model layer = model.layers.add "Test_Layer" layer.color = [255,255,255] end if( not file_loaded?("test.rb") ) plugins_menu = UI.menu("Plugins") plugins_menu.add_item("LayerColor") {layer_color} end #----------------------------------------------------------------------------- file_loaded("test.rb") That works without error - but the new layer has the color 102,68,0 and not 255,255,255!!!??? I test that: def layer_color model = Sketchup.active_model layer = model.layers.add "Test_Layer" layer.color = "Blue" end if( not file_loaded?("test.rb") ) plugins_menu = UI.menu("Plugins") plugins_menu.add_item("LayerColor") {layer_color} end #----------------------------------------------------------------------------- file_loaded("test.rb") The same result like before - Color 102,68,0 instead of blue Than I test that: def layer_color model = Sketchup.active_model my_mat = materials.add "Ahorn" my_mat.texture = "O;\\Sketchup\\Mat\\Ahorn.jpg" layer = model.layers.add "Test_Layer" layer.color = my_mat end if( not file_loaded?("test.rb") ) plugins_menu = UI.menu("Plugins") plugins_menu.add_item("LayerColor") {layer_color} end #----------------------------------------------------------------------------- file_loaded("test.rb") There was no error but also no layer!!
  • Help with grouping groups

    17
    0 Votes
    17 Posts
    918 Views
    thomthomT
    It is safer in any case - as you don't risk your edges/faces merging with stuff it should not merge with.
  • Trapping error messages

    10
    0 Votes
    10 Posts
    363 Views
    TIGT
    Add Sketchup.send_action "showRubyPanel:" into the start of your script just after require 'sketchup.rb' BUT remember to ### it out when you are done!
  • My_progress_bar

    3
    0 Votes
    3 Posts
    230 Views
    honoluludesktopH
    Tom, thanks.
  • Ruby 1.8.6

    13
    0 Votes
    13 Posts
    2k Views
    Dan RathbunD
    Hmmmm.. so when Microsoft stops supporting XP SP3 soon will SU end support as well? What about about when Microsoft only supports 64bit Windows ? (Yes I'm being a bit sarcastic.)
  • Materials vs. Entities in model (screenshot)

    13
    0 Votes
    13 Posts
    664 Views
    TIGT
    There is a reported difference between materials.current on PC and MAC. On a PC it's the currently selected material On a MAC it's the last used material and this ignores what might now be selected IF it's never been used...
  • Writing a config or temp file in Plugins folder

    20
    0 Votes
    20 Posts
    1k Views
    N
    For windows %appdata% ?
  • Alpha in Sketcup::Color

    6
    0 Votes
    6 Posts
    636 Views
    TIGT
    The 'draw' colors are OpenGL standard colors only and seem unconnected to the model.materials - so transparency is not available to them anyway. I think that making the color 'red' say [0,0,0] in the model doesn't affect the color 'red' used in the 'draw' methods. A 'color' has always has an 'alpha' value [but it was never used!]. I think that the 'A' transparency in color [R,G,B,A] is a hangover from a much earlier SUp version where it was planned that you applied a 'color' to a face - so you would then need aplha 'A' for its transparency... BUT when 'materials' [allowing texture-images etc] were introduced they contained the transparency property and thereafter the 'color' only needed to be in RGB. So if you add a value for alpha 'A' to a color it is just ignored in its rendering but remembered in its values: but if you add no value it defaults to 255. The API notes say, "color.alpha=i - NOTE: Though documented historically in the Ruby API, this method has never been implemented." Here's the rub... v7. Sketchup::Color.new('white') Color(255, 255, 255, 255) printf("%#x\n", Sketchup::Color.new('white')) 0xffffff Sketchup::Color.new('white').to_a [255, 255, 255, 255] Sketchup::Color.new('white')**.to_i** 16777215 <<<<<<<<<<<<<<<<<<<<< NOTE Sketchup::Color.new(255, 255, 255) Color(255, 255, 255, 255) Sketchup::Color.new(255, 255, 255, 255) Color(255, 255, 255, 255) Sketchup::Color.new(255, 255, 255, 123) Color(255, 255, 255, 123) printf("%#x\n", **16777215**) <<<<<<<<<<<<<<<<<<<<< NOTE 0xffffff printf("%#x\n", Sketchup::Color.new(255, 255, 255)) <<<<<<<<<<< NOTE 0xffffff printf("%#x\n", Sketchup::Color.new(255, 255, 255, 255)) 0xffffff printf("%#x\n", Sketchup::Color.new(255, 255, 255, **123**)) 0xffffff Sketchup::Color.new(255, 255, 255, 123).to_i 16777215 <<<<<<<<<<<<<<<<<<<<< NOTE [the unused alpha is ignored in the i/hex value] v8. Sketchup::Color.new('white') Color(255, 255, 255, 255) printf("%#x\n", Sketchup::Color.new('white')) 0xffffffff Sketchup::Color.new('white').to_a [255, 255, 255, 255] Sketchup::Color.new('white')**.to_i** 4294967295 <<<<<<<<<<<<<<<<<<<<< NOTE Sketchup::Color.new(255, 255, 255) Color(255, 255, 255, 255) Sketchup::Color.new(255, 255, 255, 123) Color(255, 255, 255, 123) printf("%#x\n", **4294967295**) <<<<<<<<<<<<<<<<<<<<< NOTE 0xffffffff printf("%#x\n", Sketchup::Color.new(255, 255, 255)) <<<<<<<<<< NOTE 0xffffffff printf("%#x\n", Sketchup::Color.new(255, 255, 255, 255)) 0xffffffff printf("%#x\n", Sketchup::Color.new(255, 255, 255, **123**)) 0xffffffff Sketchup::Color.new(255, 255, 255, 123).to_i 4294967295 <<<<<<<<<<<<<<<<<<<<< NOTE [AGAIN the unused alpha is ignored in the i/hex value] The 'integer value' of the color is being returned as a different value between v7 and v8 BUT the alpha is actually ignored in BOTH versions - so the alpha issue is therefore a red-herring. In v8 it is now a Bignum so face.material=0xffffffff fails - whereas in v7 it's a [ruby:3hoxppyu]Fixnum[/ruby:3hoxppyu] so [ruby:3hoxppyu]face.material=0xffffff[/ruby:3hoxppyu] works ! Somebody broke 'Color'... I'll lodge a v8 bug-report...
  • Painting a material in a 3D view

    17
    0 Votes
    17 Posts
    1k Views
    Al HartA
    I'll have to look a little closer at the video. (I just looked at it, but I might have to watch harder.) I was quite impressed by the Street View stuff at the Base Camp, but as I remember it, he had to apply the street view texture separately to each face on the building he had created. And he had to stretch and dirstort the image to match the face - so it wasn't an automatic process (or am I missing something @unknownuser said: @unknownuser said: Does PhotoMatch, or 3D street view, or whatever, already wrap an image onto surfaces Is that I said second post See video from 0. 45 minutes and following Also, when you use PhotoMatch for a texture, does it then get shaded? If so I will need to save an unshaded image from SketchUp. (I believe I can do this by turning the sun on for shading, setting Light intensity to 0 and Dark intensity to 100)
  • WebDialog (Mac) - style.visibility in SU6

    8
    0 Votes
    8 Posts
    722 Views
    T
    @thomthom said: with your original code, did you try a typeof test of the flag? just to see what it came across as? I am not JS expert, so I didn't even know that 'typeof' exists . Will check the old code. @thomthom said: did you try without semi-colon? Yep. I didn't help.
  • Drawing real time in sketchup

    3
    0 Votes
    3 Posts
    454 Views
    Y
    Thanks Chris..

Advertisement