ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
  • Addition of vectors and points

    6
    0 Votes
    6 Posts
    145 Views
    Dan RathbunD
    @ruggiero said: I was defining generic arrays and expecting them to behave like geometric vectors! Why should they? The SketchUp API does not override Array#+(), so you need to consult the Standard Ruby dictionary. (Either online, or the downloadable CHM. Follow the link in my signature, to more links in the Ruby Resources sticky thread.)
  • UI.messagebox

    9
    0 Votes
    9 Posts
    1k Views
    Dan RathbunD
    @juantxo said: Something similar occurs if you close dialog in a callback: On the PC, this might work: my_dialog.add_action_callback("test") do |web_dialog,param| web_dialog.close end my_dialog.set_on_close { UI.messagebox('NOT DISPLAYED') } AFIAK, set_on_close is still bugged on the Mac
  • Newbie to Ruby

    5
    0 Votes
    5 Posts
    162 Views
    Dan RathbunD
    Did you ALSO install TT_Lib2 ????????????? Obviously solid inspector has a library dependancy on TT_Lib2. Did you read the solid inspector post for dependancies, and install all those needed ?
  • Sketchup crash when i use thread

    11
    0 Votes
    11 Posts
    297 Views
    Dan RathbunD
    Have you tried using UI.start_timer I show an example HERE
  • New to Ruby and sketchup API, need some clarifications

    9
    0 Votes
    9 Posts
    380 Views
    jolranJ
    Notepad ++ is a good choice. It's quite used around here I think. I use it to. But I don't use bridge. I reload my scripts having robycode editor open all the time during developping. Can't remember why I do it this way Just letting you know there is that option to. @unknownuser said: From your experience is it a good idea to use core ruby classes with Sketchup and I am not sure how it will effect the working of plugin on Macs (Like I said. My experience is poor, so don't take what I have written as solid good advice. I must stress that. I just jump in and ask questions or give advice when maybe I should keep my mouth shut. ) At some point you must use the API ? Doesent matter if youre on Mac or not. What I meant was that if there already exist a method in the API, one should use it. Most likely it will be a faster method then what you will create in Ruby. Automatic Sketchup is really good for getting grasp of transformations and such. But you should really poke around other peoples scripts to get a feel of how to do things.. http://sketchucation.com/forums/viewtopic.php?f=180&t=25305 There are some recent performance tips here. And a few things to avoid.
  • Portable SketchUp Game Possible?

    12
    0 Votes
    12 Posts
    487 Views
    KrisidiousK
    Actually a EuroZone court found that you can transfer your license. But that was a paid license not a free one. And would most likely only be applicable in that jurisdiction. But alas Russia and some other places don't care what kind of copyright law you write. They do as they please. And I never had any issues with registry keys. Although I run CC cleaner on my registry every few months just to keep it tidy.
  • Using the Entities Class entities.add_arc

    2
    0 Votes
    2 Posts
    104 Views
    Dan RathbunD
    @tinhnguyen20 said: What is a normal and can somebody give me an example? The vector perpendicular to and pointing away from the front of the object's plane. See Wikipedia: Surface Normal from which comes this image: [image: 222px-Surface_normal_illustration.png]
  • Writing material thumbnails

    3
    0 Votes
    3 Posts
    89 Views
    A
    Material.write_thumbnail is bugged in its design. If I remember it preserves the aspect ratio but exports the largest dimension no larger than 128px (or something, at least the cause why it fails most of the times is when one dimension is rounded to 0). I'm still searching for the detailed forum post and bug report on this. Don't use it, but use Jim's suggestion with a material applied to a group. It will retain the color shift and colorized properties.
  • Procs and lambdas

    5
    0 Votes
    5 Posts
    116 Views
    jolranJ
    @unknownuser said: What does "reuse the iteration" mean? Hm. maybe my explanations and english where bad. Hash.each{|k, v| v.do something } is called an "iteration", right? Iterate a Hash. Depending on something do the same iteration on other Hash with different values. Seams like waste retyping the same code again.. I know you are asking why I don't pass in a nested Hash, or array and just do everything in 1 go. In this case I just cant.
  • Match Photo API?

    9
    0 Votes
    9 Posts
    233 Views
    T
    Any other ways you guys can think of?
  • Adding items to an existing sub menu

    4
    0 Votes
    4 Posts
    197 Views
    J
    @sdmitch said: So even though the global variable retains lts value, the entity it references doesn't exist? I don't know the internals. But as yoou noticed, even when the global variable appears to reference a valid menu object, new items are not added after some short amount of time.
  • Access to Ruby standard library from scripts?

    3
    0 Votes
    3 Posts
    524 Views
    thomthomT
    Standard Library isn't compatible with SketchUp Ruby. For instance, the Set class that SketchUp bundle isn't compatible with the STL Set class.
  • Get materials from definition (through file operation).

    9
    0 Votes
    9 Posts
    147 Views
    jolranJ
    @unknownuser said: OK.. then why not ALSO have a premade collection of Materials in a "plugins/folder/materials" directory ? Might be better to grab the materials from components in this case. The idea is that the end user should be able to add new components to that folder and everything updates. Anyway, I "sort of" have it working already now with option 3 (wich was pointed out earlier). Thanks for the suggestion.
  • Identification method

    7
    0 Votes
    7 Posts
    173 Views
    Dan RathbunD
    (1) Please go to the User Control Panel and fill in the statistics so we can better know about your level and use of SketchUp. (2) Follow the Guide to learn standard Ruby basics, then simple SketchUp Ruby projects, before attempting advanced projects. If you are attempting to program manifold solid features with or for the SketchUp Free edition, then you will need to be a very advanced programmer. Look at the code that others have done in this area first. (It can save you a lot of time.)
  • SourceTree Git Client for Window - Beta Signup

    4
    0 Votes
    4 Posts
    321 Views
    thomthomT
    Aye.
  • [Code] Quick Reference Card in a WebDialog

    15
    0 Votes
    15 Posts
    804 Views
    S
    @driven said: @slbaumgartner said: John, do you have a custom WebKit installed? Or some kind of PDF viewer plugin? Are you insinuating that I may have tampered with my SU instal;) I have the standard WebKit SU WebDialog doesn't seem to use Safari's WebKit built-in PDF — from file “”. MIME Type Description Extensions application/pdf Portable Document Format pdf but instead seems to be using Adobe Acrobat and Reader Plug-in Adobe Acrobat and Reader Plug-in for Web Browsers, Version 9.5.2 — from file “AdobePDFViewer.plugin”. Nice plugin scanner, John! I got Adobe Acrobat and Reader Plug-in for Web Browsers, Version 9.0.0 — from file “AdobePDFViewer.plugin”. So maybe there's a version sensitivity involved? In any case, it seems to support Dan's feeling that PDF display via WebDialog is not reliable from machine to machine.. Steve
  • Save dialog causes bug splat

    3
    0 Votes
    3 Posts
    81 Views
    thomthomT
    Does it happen if you have only your plugin loaded?
  • Stop SketchUp from asking to save file before closing?

    7
    0 Votes
    7 Posts
    294 Views
    renderizaR
    Thank you so much...This solved my problem! The one I am using is your second suggestion since the revert method didn't produce what I wanted. The time it takes to save is not much so I am happy. Again thanks!
  • Make Save and Saveas toolbar

    4
    0 Votes
    4 Posts
    175 Views
    renderizaR
    Just in case here was a discussion about this topic I happened to find. https://groups.google.com/forum/#!msg/sketchupruby/ymKyqD_nxBU/AczVTLjFld4J
  • Small console error?

    2
    0 Votes
    2 Posts
    79 Views
    thomthomT
    It's an debug message from V-Ray for SketchUp.

Advertisement