TIG speaks not of the temporary folder itself, but of its "parent folder". Under the assumptions of Windows users this would be a writable app data directory (exactly what we've been searching): C:\Users\<username>\AppData\Local%(#999999)[\Temp] (Probably equal to what we get from the APPDATA environment variable.)
But we cannot blindly take a parent folder without knowing what it is. There is nothing wrong if other operating systems have the temporary folder at root level /tmp with no parent. Still not a single solution without OS-specific switches.
Posts
-
RE: Safe place to store user-defined parameters
-
RE: Your Ideas for SketchUp 2014
While I think that is a great idea (and resolves the UX problem of zooming in vs. jumping through a face), I believe someone would weigh in that then people would start pushing the "small details frontier" (as already the polycount frontier).
-
RE: Download skp files directly into Sketchup
Hi,
this is not the code that downloads model into SketchUp. This is the code that you see in a normal browser. No browser allows websites to access your local programs or modify your SketchUp model.
Inside SketchUp, Trimble uses a different version of 3D Warehouse and modifies the browser to listen to certain commands ("action_call_back" with skp protocol handler).You don't have access to this because it works only in the 3D Warehouse window. You could develop a SketchUp plugin and replicate the same function, but SketchUp's API does not provide a method for downloading files, so you would even have to program a downloader.
Much easier is it to tell you clients to drag & drop the link (url) of a model into SketchUp. SketchUp can load dragged files as well as load files from the web. You could use the html5 drag&drop API so that you don't need to show the url to the model (but an image whose drag&drop data is a url).
-
RE: Web dialog pass data from Ruby to webdialog
That is because you "kill" the document when you do
document.write(query). Look at the documentation ofdocument.write.This works:
@name = "the name" @description = "the description" dialog = UI;;WebDialog.new("Details", true, "sachi_pluginname_dialogname", 410, 875, 1030, 0, true) dialog.add_action_callback("pass_data") { |dialog, htmlpage| js = "set_details(#{@name.inspect}, #{@description.inspect})" # It's not java. dialog.execute_script(js) } dialog.set_file 'C;\Program Files\Google\Google SketchUp 8\Plugins\set_id\details.html' dialog.show()<html> <head> <script> function callRuby(htmlpage) { // Declare the variable with "var" so that it is not global. var query = 'skp;pass_data@' + htmlpage; window.location.href = query; } function set_details(a, b){alert(a); // Example 1 var text = document.createTextNode(a); document.getElementById("detail1").appendChild(text); // Alternative // document.getElementById("detail1").innerHTML = a; // Example 2 document.getElementById("detail2").value = b; } </script> </head> <body> <div id="detail1"></div> <input id="detail2" /> </body> <script> // If you will access element in the page, you need to do this after the page (body) has loaded. callRuby("pull_selection_count"); </script> </html> -
RE: Safe place to store user-defined parameters
I think for simple configurations (keys, values etc.)
Sketchup.write_defaultis the ideal solution because it uses the API, and the API makers care about that it works.
But sometimes one wants to store more data or even files, so called "user data" (vs. "config").
I don't know what Fredo has in mind. -
RE: SketchUp and Rubies on Linux (yes, it works)
In the meantime Wine has reached a state where SketchUp can be used without Microsoft's Internet Explorer, but with Wine's own opensource Internet Explorer replacement that is based on Firefox/Gecko.
This means we can have all the goodness of Gecko in WebDialogs!

-
RE: Safe place to store user-defined parameters
That's very easy, if the OS vendor finger-points at the one who plays bad, then everyone has to try to play nice.
User's personal data (settings on one side and user data (works, templates, user-managed plugins on the other side) belong to the user level also on other operating systems (of which Windows is only one special example, I even do not use Windows). Then there would not be permission problems. It has often enough been pointed out that plugins in the Windows version SketchUp are in the wrong place.The permission problem story on Windows has its origin that it was designed as a single user OS at a time when also security models where basic or non-existing. Microsoft decided to keep compatibility instead of "deprecating" older applications (or applications that don't follow the new rules), which lead to this inconsistency.
-
RE: [Doc] Official LanguageHandler Docs
That's the end. Once it's an official API they won't fix/rename/add what has been urgently requested.
-
RE: SketchUp 2013 Gripes & Bitchin' ONLY ;)
Ruby runs also on ARM (or sparc or whatever you want). If SketchUp were about to support ARM devices/desktops, they would without doubt be able to include the SketchUp Ruby API as well (with bigger or smaller effort for porting).
I think the reason is that x86 64bit is fully compatible with x86 32bit, it's just a "gimmick"/bonus that improves some tasks, but not all.Another "future gripe" (that hopefully comes not true):
It would be a mistake to follow for a mobile version the current "conservative" philosophy of native non-cross-platform development. We see already that it's too hard to even maintain two codebases for Windows and OSX without cross-platform technology (see the significant differences in UI, features and bugs). It would be not future-proof to build one app for Android and one for iOS with separate code-bases and at the same time locking out users of the growing alternatives (Firefox, Tizen, etc, etc, Windows Phone 8). It's a pluralizing market and by catching the common denominator, a lot of wasted effort can be spared. -
RE: Understanding overlayed transparent OpenGL polygons

Turning back edges on increases the general opacity, and the previousy missing overlayed part appeared (although with less opacity than expected).
However changing the opacity of the drawing color between 0 and 0.9 does not have the same effect, so the opacity increase is another not much related side effect. Drawing additional lines with line_stipple doesn't change anything. I don't know how back edges achieve the difference. -
RE: Understanding overlayed transparent OpenGL polygons
The best (nicer) but it seems only to affect pngs.
The example should be fully working. Do you see the same phenomenon? -
RE: Understanding overlayed transparent OpenGL polygons
I tried GL_QUADS with independent quads (instead of GL_QUAD_STRIP) and the same result, I tried reversing the orientation of some quads, and I tried using 4 method calls (on for each quad).
# Individual quads @ps1 = [ [1, 1, 1], [3, 1, 1], [3, 3, 1], [1, 3, 1], [3, 3, 1], [1, 3, 1], [1, 3, 3], [3, 3, 3], [1, 3, 3], [3, 3, 3], [3, 1, 3], [1, 1, 3], [3, 1, 3], [1, 1, 3], [1, 1, 1], [3, 1, 1]] 4.times{ |i| view.draw(GL_QUADS, @ps1[4*i...4*i+4]) }Intel GM945
It's also not influenced by the transparency quality setting in Styles/Face Style.
-
Understanding overlayed transparent OpenGL polygons
When drawing a transparent box, its sides usually should overlay. This seems not to work reliably using the OpenGL methods. Does it depend on the graphics card?
Can someone test and tell me if this example looks the same?
(I've left the box open so it is easier to recognize the sides.)

class AlphaBox def initialize @color = Sketchup;;Color.new("red") @color.alpha = 0.2 @ps1 = [[1, 1, 1], [3, 1, 1], [1, 3, 1], [3, 3, 1], [1, 3, 3], [3, 3, 3], [1, 1, 3], [3, 1, 3], [1, 1, 1], [3, 1, 1]] @ps2 = [[1, 1, 1], [1, 3, 1], [1, 3, 3], [1, 1, 3], [3, 1, 1], [3, 3, 1], [3, 3, 3], [3, 1, 3]] end def draw(view) view.drawing_color = @color view.draw(GL_QUAD_STRIP, @ps1) 8.times{ |i| view.draw_text(view.screen_coords(@ps1[i]), i.to_s) } #view.draw(GL_QUADS, @ps2) end end Sketchup.active_model.select_tool(AlphaBox.new) -
RE: Curiosity between V8 and 2013
Sketchup requires developers to set both icons (small_icon and large_icon). Can you toggle the icon size, maybe just one of the sizes is missing?
-
RE: Safe place to store user-defined parameters
That is a temporary folder. We have to ask John how long temporary files stay there, but usually one cannot assume that temporary files stay until after a reboot. It is only exceptional for Windows that temporary files stay for "long" (I once found years old files).
-
RE: [Plugin] Ruby Console+ (3.0.2) – updated 30.10.2017
A new version has been uploaded!
Ruby Console+ 2.0 is more robust, more powerful and more beautiful! -
RE: Apple's WWDC 2013 announces the Mac Pro 'trash can'!
Some desktops are (or can be made) already so small, but only sold as "net tops". But nowadays also powerful hardware could fit in the form factor, the question is how to make the form factor attractive to Pro users.
Where does it have its CD/DVD drive? That's an expectation that will change soon.
-
RE: "Toolbars" Plugin not working with SU 2013 ?!?
I have no idea why the other solution (the download of the loader.rb) worked for some, it's just overwriting an older by a less old version.
To edit a ruby file you can use a normal plain text editor (Notepad, Notepad++, gedit, etc.). ".rb" files are not installable plugins. SketchUp can not reliably know how to install them, because of that the install button is only for true extensions that are zipped according to the guidelines for SketchUp rbz extensions.
-
RE: Cleanup Old Plugin Versions?
The first line gives you the (incomplete) directory path
Plugins/k2ws_Comp2LayerScene/K2WS.The second line gives you correctly
./K2WSbecause "k2ws_Comp2LayerScene.rb" has no file path. Nobody can no where this file name is flying around, and so Ruby does not know as well. If no absolute path is provided, it is interpreted as a relative path to the current directory (./) which is then joined with K2WS.Using the dynamic variable
__FILE__is absolutely fine (at was probably not written here as a placeholder). This variable will always be the file path of the file that is being loaded.