ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
  • Where is the SketchUp API site?

    19
    0 Votes
    19 Posts
    4k Views
    TNTDAVIDT
    It's wonderful Pixero. Well tried Pilou, but these are the methods and ruby class for SketchUp that interests me. I am happy to find this good old API.
  • Dynamic Component Redraw

    10
    0 Votes
    10 Posts
    4k Views
    Dan RathbunD
    Scott Lininger left Trimble/SketchUp several years ago to start his own company. (He is unlikely to see or reply to your question. Ie, this topic thread is at least 7 years old!) There are more recent threads on making custom DC functions (but you should not publish any custom changes.) See this thread: http://sketchucation.com/forums/viewtopic.php?f=180&t=67235
  • Start and commit operation: how they work?

    16
    0 Votes
    16 Posts
    4k Views
    A
    I think I figured it out. Enabling transparent mode for an operation will simply merge it with a previous non-transparent one, regardless if the previous operation is active or not. So, even this should work: model = Sketchup.active_model model.start_operation('Main OP', false, false, false) # A placeholder for all sub operations model.commit_operation x = 0 while (x < 100) model.start_operation('Sub OP', true, false, true) # Do some crazy geometry manipulation, # that I don't want the observer to respond while I'm doing it... model.commit_operation # Committing operation will allow the observers to respond and update view properly. # Do something involving view, like exporting proper view into images # Increment counter x += 1 end Edit: Nevermind. transparent flag is limmited to 100 operations. After that it turns into a normal operation, flooding the undo stack. Running one operation with ui_disable set to false does update the view properly, so I'll stick with it, but it's slow...
  • How to use custom fonts that are not installed?

    3
    0 Votes
    3 Posts
    1k Views
    renderizaR
    Hi, I was not expecting it to be that difficult and don't think its practical anymore to use custom fonts on my plugins. Maybe I'll start looking into drawing images again. Thanks for your help!
  • Delete All Scenes with API Question...

    2
    0 Votes
    2 Posts
    1k Views
    TIGT
    When you iterate a collection - like pages, or selection or entities, and change that collection's contents - e.g. by deleting something - then you get issues because the collection changes as a result. BUT if you 'freeze' the collection, but using .to_a OR perhaps you collect items, which are then deleted afterwards, after you exit using the collection... then it avoids the issue.
  • Fredo6 Tools problems on macOS High Sierra

    9
    0 Votes
    9 Posts
    2k Views
    fredo6F
    Steve, Just sent you a PM about all this. Fredo
  • Middle mouse button.

    8
    0 Votes
    8 Posts
    2k Views
    renderizaR
    Hi, I have the same problem in 2017...Is this going to be fixed? Here is the test I did... class TestMiddleButton #Not Working... def onMButtonDown(flags, x, y, view) puts "onMButtonDown; flags = #{flags}" puts " x = #{x}" puts " y = #{y}" puts " view = #{view}" end #This one is working.... def resume(view) puts "resume; view = #{view}" end end Sketchup.active_model.select_tool TestMiddleButton.new
  • Round straight with round ends

    4
    0 Votes
    4 Posts
    1k Views
    D
    Ah...yes, I didn't think of selecting more than 1 edge, thanks!
  • First plugin published by warehouse

    3
    0 Votes
    3 Posts
    1k Views
    K
    It already is available here. I am making some more changes before updating it here. Keith
  • Enable SketchUp tools

    6
    0 Votes
    6 Posts
    1k Views
    TNTDAVIDT
    Thank you for these solutions.
  • Trying to set global axis from API

    5
    0 Votes
    5 Posts
    1k Views
    K
    Thanks for the comments. This looks like a much more involved solution than my problem is worth. I think I will just stay with the requirement that component joint face needs to hahe 2 edges, common vertex and intersect at 90 degrees to work with my joint tool plugin. I was thinking of a plugin that would add a rectangular face on the existing face to be used for joint detail then deleted when finished. This worked for parts aligmed to the globel axis but not with rotated parts. Keith
  • Problem with API or my plugin?

    2
    0 Votes
    2 Posts
    1k Views
    K
    This is the first time I didn't get a response on a code question. However by making this test plugin I did find out what was wrong with the results on the counter clockwise edge selection and this has led to a much simpler work around to clean up the push pull results. I am running a code that looks for edges with 0 or 1 face attached and removing them then loop thru again as the first loop exposes additional edges with 0 or 1 face only. I still think the code is correct and there is a bug in SketchUp API when a pus pull face intersects the outside edge. I have seen this in other code I have written. Keith
  • HTMLDialog vs WebDialog?

    23
    0 Votes
    23 Posts
    5k Views
    Dan RathbunD
    Basically I'm trying to prompt you to learn how to read Ruby error and backtrace messages. “filename:lineNo: inmethod”‘ or “filename:lineNo.”` http://ruby-doc.org/core-2.2.4/doc/syntax/exceptions_rdoc.html http://ruby-doc.org/core-2.2.4/Exception.html @medeek said: Okay 95% of that just went over my head, but I'll try and decipher into terms I can understand. https://en.wikipedia.org/wiki/Data_validation An example in Ruby of testing if an object reference is pointing at an object of a certain class: if obj.is_a?(NilClass) ... or ... if obj.is_a?(Float) An example in Ruby of validating that an object reference call responds to a certain method call: if obj.respond_to?(:methname) ... and testing for the "asterisk" method specifically: if obj.respond_to?(:*) @medeek said: But why would this error only be raised for SketchUp running on MacOS and not Windows? I don't know (offhand) as I avoid Macs myself. (But OSX and MS Windows use different sets of keycodes.) Actually, looking at the backtraces (in your original error listing) the errors are kicked off by a LButtonDown keypress, but are occurring in the `` create_timber_geometry()`' method, lines 1064 and 1355.
  • Convert to length error

    2
    0 Votes
    2 Posts
    1k Views
    S
    Can't say with absolute certainty without seeing your code, but you are most likely right about the decimal point mark causing the error. Depending on your OS and its settings, the mark may or may not automatically change when you change the input language. You may have to change the locale and reboot.
  • AI in SketchUp

    2
    0 Votes
    2 Posts
    1k Views
    F
    For Sketchy Physics there are some models in 3D-Warehouse with approaches to AI.
  • Dynamic Component DCFunctionsV1 within in Module

    34
    0 Votes
    34 Posts
    8k Views
    michaelwhksgM
    A proposed layout for a new site that shows the pallet racking, with a dedicated mezzanine on the left and conveyor system for segregating the inventory via dispatch routes. https://warehouseblueprint.com https://youtu.be/dEl8C2FJ9A8 [image: ic0e_WarehouseLayout20.png] [image: SLfl_WarehouseLayout20-rendered.png]
  • Hexagon

    2
    0 Votes
    2 Posts
    1k Views
    sdmitchS
    @medeek said: Is there a simple way to draw a hexagon with the API, I'm not seeing it. I would like to specify a center point and radius similar to what you do to add a circle. entities.add_ngon(center,normal,radius,sides)
  • Question about cubicpanoout.rb

    17
    0 Votes
    17 Posts
    3k Views
    filibisF
    @valerostudio said: This is an old posting but seems to be an issue in 2017. Anyone have a solution for this? If you are experiencing 'grey bars' problem, try using these resolutions: 1020, 2040, 4080 etc... (multiplied by two) I don't know why but it works that way. Also check this plugin for a better version with additional WebGL features: WebGL Cubic Panorama
  • Method or plugin for subdividing like this sample

    31
    0 Votes
    31 Posts
    5k Views
    tuna1957T
    JQL, sorry your "gardening" efforts haven't born fruit. Your right that Twilight has it's roots in KT. Really surprised that other render engines don't have a bevel function, particularly those that are a lot more pricey than Twilight. "planting a seed" might have been the wrong term. Sounds like it's time for screaming, shouting and name calling.....
  • Geom::Transformation

    5
    0 Votes
    5 Posts
    1k Views
    anteolicA
    Thanks!

Advertisement