πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
  • Don't name a method "next"!

    9
    0 Votes
    9 Posts
    596 Views
    thomthomT
    Windows7, Ruby 1.8.0 - Console Session (IRB) C;\Users\Thomas>irb irb(main);001;0> next() LocalJumpError; unexpected next from C;/Ruby/lib/ruby/1.8/irb/workspace.rb;81;in `evaluate' from C;/Ruby/lib/ruby/1.8/irb/context.rb;219;in `evaluate' from C;/Ruby/lib/ruby/1.8/irb.rb;150;in `eval_input' from C;/Ruby/lib/ruby/1.8/irb.rb;263;in `signal_status' from C;/Ruby/lib/ruby/1.8/irb.rb;147;in `eval_input' from C;/Ruby/lib/ruby/1.8/irb/ruby-lex.rb;244;in `each_top_level_statement' from C;/Ruby/lib/ruby/1.8/irb/ruby-lex.rb;230;in `loop' from C;/Ruby/lib/ruby/1.8/irb/ruby-lex.rb;230;in `each_top_level_statement' from C;/Ruby/lib/ruby/1.8/irb/ruby-lex.rb;229;in `catch' from C;/Ruby/lib/ruby/1.8/irb/ruby-lex.rb;229;in `each_top_level_statement' from C;/Ruby/lib/ruby/1.8/irb.rb;146;in `eval_input' from C;/Ruby/lib/ruby/1.8/irb.rb;70;in `start' from C;/Ruby/lib/ruby/1.8/irb.rb;69;in `catch' from C;/Ruby/lib/ruby/1.8/irb.rb;69;in `start' from C;/Ruby/bin/irb;13 Maybe IRB bug!! irb(main);002;0> exit C;\Users\Thomas>
  • Hiding Outliner Window

    24
    0 Votes
    24 Posts
    3k Views
    F
    Hi Tig (and all others), Thanks for the responses, fixed my problem wonderfully. Kudos. I did try using start_operation() with the second parameter set to true, but the Outliner window is still redrawn when each dynamic component is redraw using $dc_observers.get_latest_class.redraw_with_undo(compInst).
  • Best way to export each layer as a file

    5
    0 Votes
    5 Posts
    279 Views
    TIGT
    @xiobus said: Anyone have suggestions on the best method or any methods on saving each layer as its own file? It already wrote it... http://forums.sketchucation.com/viewtopic.php?p=183609#p183609 export_by_layer('type')
  • View.pickhelper

    19
    0 Votes
    19 Posts
    2k Views
    Dan RathbunD
    @thomthom said: View.pick_helper http://code.google.com/apis/sketchup/docs/ourdoc/view.html#pick_helper @unknownuser said: If you supply x and y, they are screen coordinates of the point at which you want to do a pick. Typically, there will be points that were passed to a method on a tool class. From that I'm given the impression that I can do: ip = view.pick_helper(x, y) And it'd then return a PickHelper that's picked a point. But that does not seem to work. The API should probably say "If you supply x and y, they are screen coordinates of the point at which you will want to do a pick." (refering to the pick as a future event, yet to occur.) @thomthom said: If I do this: ip = view.pick_helper ip.do_pick(x, y) Then it works. Because the description of PickHelper.do_pick states: "The do_pickmethod is used to perform the initial pick." So, prior to this method getting called, the picklist should always be empty; and PickHelper.count should return 0. @thomthom said: Bug? YES bug. I think it either may have once worked and because of changes it no longer does, OR it was intended to work, but when the code for PickHelper class was written it wasn't possible, or someone forget the intention, etc. (perhaps more than one person was working on it and things got lost in the shuffle.) What is supposed to happen when you call: ph = view.pick_helper(x,y,apt) ? I think something like this: class Sketchup;;View def pick_helper(*args) case args.size when 0 Sketchup;;PickHelper.new() when 1 raise ArgumentError,"x and y required", caller else Sketchup;;PickHelper.new().init(args) end end#def end#class @thomthom said: then what's the point of the arguments in the view_pickhelper method? So the arguments for View.pick_helper were really 'intended' to be passed to PickHelper.init, so that you could then use either PickHelper.test_point or PickHelper.do_pick without having to again specify the x,y. Any method that takes an apeture would also use either the one set by .init or (as we are told in the API,) the "standard Sketchup aperture size". However, PickHelper.do_pick always requires the two x,y arguments (regardless of whether .init was first called.) And PickHelper.test_point, I cannot get to return true (regardless of whether .init was first called, or all arguments are specified.) Even when the point argument is exactly the same as the x,y .. still .test_point returns false. p3.test_point [200,200],200,200,20 >> false _
  • GPS coordinates

    3
    0 Votes
    3 Posts
    1k Views
    thomthomT
    I'm moving this thread to the Developer Section.
  • [Webdialog] onresize firing twice

    12
    0 Votes
    12 Posts
    993 Views
    chrisglasierC
    Dan, my view is not to introduce anything that might antagonise Mr Mac ... there's seems enough problems with starting and window.location wobblies as bemoaned in this topic. On the other hand I would quite like machine owners to be able to determine the way their information is best viewed by manipulating the window - I guess maybe later. All seems much easier with .hta's but then so limited in other respects. Thanks for your input.
  • DC Toolbar slowing Sketchup?

    2
    0 Votes
    2 Posts
    172 Views
    J
    Yep, I've noticed this slow-down also. For me, it seems to be worst when I simply select a lot of geometry. Probably more noticeable on older machines.
  • Support for data serialization formats

    7
    0 Votes
    7 Posts
    968 Views
    Dan RathbunD
    @dan rathbun said: @richmorin said: I have a bunch of configuration data that I want to serialize, write to a file, and have my plugin load. Suggestions, anyone? The 3rd, option is to use the Sketchup.write_defaultand Sketchup.read_defaultmethods to store your plugin options in the Windows Registry (win32) or Plist file (Mac). Con here is that your options must be 'flatfile' data. No multi-level data is allowed. Actually not entirely true. You can set up the text fields of your attributes anyway you wish, since it's your plugin that will use them. If it's easier, and faster for loading.. you can have 'array' fields. ie, a single attribute value can actually be a CSV list of multiple values. (You can use whatever delimiter you wish, not just comma.) del = '%' # delimiter valListString = arrayOfValues.join(del) # then assign valListString to attribute value # reading is opposite # assign attribute value to valListString arrayOfValues = valListString.split(del) # you'd need to iterate the array and convert # any number strings to numerics # see the Sketchup extenstion String.to_l Sketchup extenstion String.to_l
  • SketchUp API consultants?

    2
    0 Votes
    2 Posts
    220 Views
    TIGT
    I've sent you an email... Suggest you edit your initial post to 'discombobulate' your email address [to protect it from bots] e.g. rdm_at_cfcl.com.
  • Big SketchUp Applications?

    4
    0 Votes
    4 Posts
    330 Views
    BurkhardB
    Maybe Pixdim? http://www.pixdim.com
  • Bill of quantitis??

    7
    0 Votes
    7 Posts
    468 Views
    pilouP
    Why not? This make something like this
  • New Toolbar button ?

    10
    0 Votes
    10 Posts
    469 Views
    thomthomT
    Modifying Ruby and Sketchup base classes are a big no-no. Some other plugin might require the original behaviour. Instead of modifying the existing - create your own class which inherit the HAsh class and modify that.
  • Moving Smoothly

    7
    0 Votes
    7 Posts
    407 Views
    thomthomT
    @chris fullmer said: Don't forget that refresh is new to 7.1 (or was it 7.0?). Anyhow, it is new and not compatible with older versions... Chris 7.1 http://code.google.com/intl/nb/apis/sketchup/docs/releases.html
  • Ruby right write

    13
    0 Votes
    13 Posts
    577 Views
    J
    I think it's odd that the parser would be sensitive to a newline at the end of the file.
  • ? on transformation

    4
    0 Votes
    4 Posts
    254 Views
    J
    .transform! uses the Group's or Instance's current Transformation and applies the new one (change by a Transformation) .transformation= simply replaces the Group's or Instance's Transformation with the new one (change to a Transformation.) For example, if you use the IDENTITY matrix: entity.transform!(IDENTITY) - no change. entity.transformation= IDENTITY - position, rotation and scaling are all reset.
  • Ruby Documentation - you can help update it!

    14
    0 Votes
    14 Posts
    3k Views
    thomthomT
    @huckrorick said: This link leads to lots of dead end links. http://groups.google.com/group/SketchUp-Plugins-Dev Is this still functioning as you describe? Huck That's an old outdated link. This is the current API reference: http://code.google.com/intl/nb/apis/sketchup/docs/index.html
  • Array of unique points?

    10
    0 Votes
    10 Posts
    514 Views
    thomthomT
    I was pretty sure I'd tried that! But clearly I haven't! ` point1 = Geom::Point3d.new 1,1,1 Point3d(1, 1, 1) point2 = Geom::Point3d.new 10,10,10 Point3d(10, 10, 10) point3 = Geom::Point3d.new 10,10,10 Point3d(10, 10, 10) s = Set.new #Set:0xbd7da68 s.insert(point1) #Set:0xbd7da68 s.insert(point2) #Set:0xbd7da68 s.insert(point3) #Set:0xbd7da68 s.to_a [Point3d(1, 1, 1), Point3d(10, 10, 10)]` Very interesting that it evaluates differently. It compares the values, not the objects. Exactly the kind of solution I was hoping for.
  • Exporters for open source renders

    5
    0 Votes
    5 Posts
    392 Views
    D
    Yes, that is what I'm using, but there are always problems.
  • JSLint - what's important, what's not?

    9
    0 Votes
    9 Posts
    2k Views
    chrisglasierC
    @chrisglasier said: @ TBD ... will post any interesting (to me!) outcome. @unknownuser said: Error: Problem at line 116 character 5: Bad line breaking before ','. } Problem at line 161 character 65: Be careful when making functions within a loop. Consider putting the function in a closure. o.onmousedown = function() { coreDown(this , c , dv ); }; Problem at line 297 character 18: 'noldDown' was used before it was defined. function noldDown(params){ //params = cell , sliderName , sliderNo , cnt... Problem at line 389 character 18: 'moldDown' was used before it was defined. function moldDown(params){ Implied global: ActiveXObject 16,34, window 43,44 Well not perfect but I think acceptable (please correct me if I am wrong).
  • Changing Dashed Lines

    6
    0 Votes
    6 Posts
    644 Views
    TIGT
    @dave wood said: Thanks, again, TIG, I opened the 2D toolbar and couldn't get the help file from there, either. I can open the .htm file directly in the 2D Tools subdirectory. I get a message that the internet explorer can't display webpage. Windows can't diagnose the problem. What is the web browser? Good question, keep in mind you're working with a relative novice.-- The top of the window says SketchUcation Community Forums.- Internet Explorer provided by Dell. Below I've got a couple of Google search "panels" and a microsoft bing search "panel". I didn't have time to look into the commands, but a read some of the instructions. You started to lose me a little with some the info re: how the lines reside on edges, faces, etc. and how the width of the line is affected. I imagine it might be overly difficult to add some illustrations. See, you give the people all this, and all they do is ask for more! Thanks again very much. I'm looking forward to using some of these tools. Are you a Vista 'Administartor' ? The Help htm works in IE and FireFox for me... Strange ? It's easiest to try the tools out in a scrap Model - learn by doing...

Advertisement