Sketchucation Tools 5.0.7 | Licensing improvements and bug fixes Learn More

Subcategories

  • No decscription available

    20 Topics
    462 Posts
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • Plugin publishing questions.

    7
    0 Votes
    7 Posts
    519 Views
    G
    Sounds good. The draw step can be reversed or stopped by deleting the group the draw is writing to, but I don't have it enclosed in an operation. I can add that in. That's the only thing that really needs to be undone; I'm not really crazy about a single undo step rewriting the CNC environment variables and outputting the gcode to a file is a single step anyway that can't be reversed short of deleting the files from the filesystem.
  • Overwritten script!!!

    5
    0 Votes
    5 Posts
    497 Views
    D
    did you type it directly into 'Ruby Console' and is the session still open? if so, you can use the 'up arrow' to go back to it, otherwise it's a learning experience... EDIT: should have read the post in detail first, but I'll leave this up for others... if your on linux what editor did you write it in, most have history... john
  • Create file with accent in the path

    23
    0 Votes
    23 Posts
    2k Views
    Dan RathbunD
    @tt_su said: @dan rathbun said: fail() #re-raise the last exception Never seen that method used before. Is that different from just calling raise? raise() is an alias for fail() See the doc on the Kernel module: http://www.ruby-doc.org/core-1.8.6/Kernel.html#method-i-fail The best practices guides I have read, suggest that fail be used instead of raise, for readability, I suppose. But I really did not understand the logic in the guide. (I think it was something like "raise" has more meanings as a verb than "fail" ?)
  • Is there a <select equivalent for <input onClick?

    7
    0 Votes
    7 Posts
    887 Views
    sdmitchS
    Thanks much Dan for the info. Looking back at by previous posts, I see that I never made it clear that the question is relative to a WebDialog associated with a plugin. Don't know if that matters but just so you know. Eureka I have found it. It was all a matter of where the onChange was. Because the onClick was part of each radio button statement, I assumed it was the same with the select list. Instead it just needed to be in the <select> statement itself. Thanks again to one and all for the links that put me on the right path to find the answer. def showme() @dlg=UI;;WebDialog.new("VerySimple", true,"Test",500,300,10,10,true) @dlg.set_html( "<html> <body> <form> <select onChange='tellSketchup(value)'> <option value='option1' >Option 1</option> <option value='option2' >Option 2</option> </select> ; Head Type<br><br> </form> <script type='text/javascript'> function tellSketchup(value) { window.location='skp;OptionChanged@'+value; } </script> </body> </html>" ) @dlg.show {} #show it @dlg.add_action_callback("OptionChanged") {|d,p| puts "OptionChanged value=#{p}" } end
  • Minimize WebDialog from code?

    5
    0 Votes
    5 Posts
    480 Views
    D
    maybe I'm missing the point... @dlg.set_size(100,100) @dlg.set_position(100,100) @dlg.set_size(1000,1000) @dlg.set_position(100,100) can switch between 2 sizes at the same position... john
  • EntitiesObserver Weirdness

    3
    0 Votes
    3 Posts
    356 Views
    K
    Hi Dan, Holding a reference does't make any difference. The only time the reference held by @m is actually stored is when the observer is assigned to Sketchup.active_model.entities. Also, I noticed that in cases where I have a new file, and I first add the observer to a group's entities collection, the observer does not alert onElementModified for the material. It only alerts for the face. Thanks, -- Karen
  • Trying to Display a Help File (Help.jpg)

    6
    0 Votes
    6 Posts
    435 Views
    K
    This is what finally worked: def dowelHelp dowel_help_File = File.join(File.dirname(__FILE__),"K2_ToolsSupportFiles","k2ws_DowelHelp.html") UI.openURL("file;///#{dowel_help_File}") UI.messagebox("Dowel Help Complete " + dowel_help_File.to_s) end #def dowelHelp The html file was: <!DOCTYPE html> <html> <body> <p> <img src="K2_ToolsDowelHelp.png" > </p> </body> </html> Thanks Keith
  • 3D_text color

    4
    0 Votes
    4 Posts
    386 Views
    J
    Jim/Dan, Thanks for the reply. Adding material (and back_material) to grp works for me. Understanding why this happens is even better.
  • [Code] PCFileTools

    27
    0 Votes
    27 Posts
    6k Views
    Dan RathbunD
    BUMP
  • EntitiesObserver in SU 2014

    4
    0 Votes
    4 Posts
    468 Views
    Dan RathbunD
    @kwalkerman said: Is there any other way to detect new objects in a model ... groups and component instances? Try the DefinitionObserver # onComponentInstanceAdded callback.
  • Help me solve a mystery

    11
    0 Votes
    11 Posts
    967 Views
    D
    Is this editor will have the same behavior? http://www.alexschreyer.net/projects/sketchup-ruby-code-editor/ the author said it was based on the Ruby Web Console
  • Own Plugins in 2014

    5
    0 Votes
    5 Posts
    418 Views
    F
    ok, my mistake i saved some values by write_default, at the start the plugin get them by read_default and in these values i had some non-utf-characters i changed the values and now it works like before Frank
  • Cross domain testing with ajax and JSONP

    7
    0 Votes
    7 Posts
    964 Views
    G
    I was hoping to do a POST because I will be updating a database with my real JSONP call. Unfortunately when I do a check on the php side I see that the call is turned into a GET. I agree that a timeout and an on error function is a good idea. My main question is will this work with OSX Lion. I was hoping that someone could try it out and tell me.
  • Move instances softly, using the mouse

    4
    0 Votes
    4 Posts
    428 Views
    D
    @dacastror said: ... I wanted to look at your plugins and I did not find them, look in the pluginstore and select search by author... you won't find them, there's a couple on limited beta release and a few of mac only dev tools that almost no-one else has even seen... I keep adding to them on the day I decide to release, then I want to test again, ect... etc... I PM the closest to release one if you want to comment on it... john
  • How to fetch all material in SKP via Ruby?

    2
    0 Votes
    2 Posts
    309 Views
    TIGT
    You can only access the Materials that are loaded into the Model. You can iterate the list and get various aspects of the material. Sketchup.active_model.materials.each{|material| puts material.name puts material.display_name puts material.color puts material.alpha puts material.texture ### and so on... puts } I have included the puts so the info is shown in the Ruby Console but of course you can do other things with that... A Material's '.display_name' is not always the same as the '.name' [depends on its creation/source] A Texture can also be further probed to get info like its image, size and so on... Read the API http://www.sketchup.com/intl/en/developer/docs/classes.php If you must get details of SKM files not yet loaded [and not loadable using native API methods] then you could look at my SKMtools which offer many additional tools to import/export/interrogate SKM files etc... But please learn to walk before you run
  • How to check if two ComponentInstances are in contact?

    3
    0 Votes
    3 Posts
    353 Views
    R
    Thank you sir.
  • ViewObserver doesn't fire messages on Zoom tool

    5
    0 Votes
    5 Posts
    486 Views
    Chris FullmerC
    Yeah, I can see this too. Thanks for reporting it. We've got it logged in our bug database now Chris
  • Negative uniform scale

    10
    0 Votes
    10 Posts
    799 Views
    R
    @tt_su said: That disappearing group (visually) sure looks like a bug. I'll file a bug internally (SU-29499). Meanwhile, the workaround is to specify scaling in X Y and Z explicitly. Ok, Thom. It is a small bug but it took me a long time to be assured it was not my code fault and try another way to do it.
  • Problem about ruby searching path in sketchup

    9
    0 Votes
    9 Posts
    1k Views
    W
    @dan rathbun said: I've already written a patch, and TIG has updated it twice. See: Re: Sketucation plugin load error Thank you! I use the patch,but there is still different. when sketchup install in drive c,and start with shortcut in desktop Encoding.find("locale") #<Encoding;GBK> when sketchup install in drive c,puts the patch file in tools folder,then start sketchup with shortcut in desktop Encoding.find("locale") #<Encoding;ASCII-8BIT> This different will lead some error if filename uesed some Chinese character. The patch file is still missing something?
  • Gluing Text label (in creation / modification)

    2
    0 Votes
    2 Posts
    283 Views
    TIGT
    I think the new Dim methods do allow you to get the 'entity tree' for a Dim's two start/end. You can also specify them when adding a new Dim - start=/end=... Unfortunately Text does not have the equivalent linking possibilities for its arrowhead. There are many Text methods missing - these were discussed at length at last year's BaseCamp - as were Dims, but only a few got through...

Advertisement