⚠️ Update | Sketchucation Tools 5.0.8 released with licensing improvements and bugfixes Download

Alkategóriák

  • No decscription available

    20 Témakörök
    462 Hozzászólások
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • Tool: rak - like grep only optimized for source code repos

    2
    0 Szavazatok
    2 Hozzászólások
    452 Megtekintések
    tt_suT
    Nice! Thanks for the link!
  • Web dialogs stealing focus within my tool.

    28
    0 Szavazatok
    28 Hozzászólások
    4k Megtekintések
    Dan RathbunD
    Dang it! That is news to me. Did ya'll hire someone to to be a TechWriter for the API? (Ya' need to badly.)
  • Push_tool

    5
    0 Szavazatok
    5 Hozzászólások
    471 Megtekintések
    A
    Thanks guys. Yes, I was doing a pickhelper or ray intersection and figuring out the object being clicked on and added it to the global selection. That worked fine, but only allowed selecting one entity at a time. I wanted to switch to select tool so I can use the group selection features that are available in it. Like thomthom suggested, I managed to get that working by backing up the current tool before doing Sketchup.send_action("selectSelectionTool:") and then restoring the older tool on release. This probably won't retain the tool state since I'm actually exiting the tool and re-entering, but it seems to work for my purpose. Thanks again!
  • OnKeyDown: getting the charcater value from key

    32
    0 Szavazatok
    32 Hozzászólások
    4k Megtekintések
    Dan RathbunD
    Yea did you look at the C code by clicking the method in the CHM ? It has a kind of convoluted switch statement.
  • Plugin publishing questions.

    7
    0 Szavazatok
    7 Hozzászólások
    576 Megtekintések
    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 Szavazatok
    5 Hozzászólások
    560 Megtekintések
    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 Szavazatok
    23 Hozzászólások
    2k Megtekintések
    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 Szavazatok
    7 Hozzászólások
    952 Megtekintések
    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 Szavazatok
    5 Hozzászólások
    518 Megtekintések
    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 Szavazatok
    3 Hozzászólások
    397 Megtekintések
    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 Szavazatok
    6 Hozzászólások
    507 Megtekintések
    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 Szavazatok
    4 Hozzászólások
    434 Megtekintések
    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 Szavazatok
    27 Hozzászólások
    7k Megtekintések
    Dan RathbunD
    BUMP
  • EntitiesObserver in SU 2014

    4
    0 Szavazatok
    4 Hozzászólások
    524 Megtekintések
    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 Szavazatok
    11 Hozzászólások
    1k Megtekintések
    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 Szavazatok
    5 Hozzászólások
    473 Megtekintések
    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 Szavazatok
    7 Hozzászólások
    1k Megtekintések
    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 Szavazatok
    4 Hozzászólások
    472 Megtekintések
    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 Szavazatok
    2 Hozzászólások
    365 Megtekintések
    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 Szavazatok
    3 Hozzászólások
    389 Megtekintések
    R
    Thank you sir.

Advertisement