Thanks! I wasn't aware that Ruby's Windows port does not even try to emulate the unix behavior but does something totally different. Indeed, even on unix mtime
(modification of content) is more accurate for what the fileobserver is supposed to do here than ctime
(standard: changed attributes, Windows: creation time).
Posts
-
RE: [Plugin] Ruby Console+ (3.0.2) – updated 30.10.2017
-
RE: [Plugin] Ruby Console+ (3.0.2) – updated 30.10.2017
It is reliably reloading every changed file on my system. When it works, it prints the filename ('... has been reloaded') to the console.
So it could be that some difference of the system makes the file observer not trigger (in that with
rake test
in the repo root directory the fileobserver_test.rb fails). -
RE: [Plugin] Ruby Console+ (3.0.2) – updated 30.10.2017
The previous "Reload all scripts" button had several flaws:
- it would reload too many scripts, even those that were not changed
- it was a manual action for something that was already automated
I thought since changed scripts are reloaded by default now, there is no need to have a button clutter space, or do something manually that is automated, or offer configurability if there can be a better default.
There could of course exist workflows that I oversaw, but then instead of adding a poor implementation (even for a single user) I'd prefer to find a new solution to the problem.
To understand the problem, how does the automatic script reloading not cover your workflow? When a script under surveillance changes its last modified timestamp, it should be reloaded. Why do you need to manually trigger it? -
RE: [Plugin] Ruby Console+ (3.0.2) – updated 30.10.2017
Big update to version 3.0.2!
For development, see also on github. Contributions welcome! -
RE: [Plugin] MoleculeImporter (1.3.3) – updated 8.10.2017
It was due to the number of atoms taking all the maximum of 3 digits. I fixed a bug where the plugin was not able to separate the number of atoms from the number of bonds. It should now work up to 999 atoms (maximum of Molfile v2000).
https://sketchucation.com/pluginstore?pln=ae_MoleculeImporter
Can you confirm that it works for you? -
RE: [Plugin] MoleculeImporter (1.3.3) – updated 8.10.2017
That can indeed be a problem: SketchUp is a line/polygon-based modeler, not a visualizer made for this purpose.
To reduce the polygon count, one can use a more simplified sphere component for the atoms.The plugin's folder contains two components for atoms.
In the file "molecule_importer.rb" you can change the line 48:
COMPONENT_ATOM = File.join(PLUGIN_ROOT, "skp", "atom_high.skp")
to
COMPONENT_ATOM = File.join(PLUGIN_ROOT, "skp", "atom_low.skp")
or just edit the skp files. -
RE: SKP 2015
Si le résultat est ce que tu veux, il se vaut choisir ça comme modèle type (template):
soit par Préférences → Modèle type, soit Fichier → Enregistrer modèle type. -
RE: Windows 10
CD drives are by several orders of magnitude the slowest part on a computer (most people use Live USB keys now). Everything that needs to be loaded from CD (boot, application start) will take some time until it's in RAM. This won't be on an installed system (actually file/disk operations and CPU tasks are a strength rather than GPU tasks).
But Live CDs/USBs are good for trying out. I wished Microsoft offered this for Windows 10, then people would (maybe) not anymore find out to late which software is not supported on a new/preview/beta system.
-
RE: Windows 10
I've been using Ubuntu (because it's elegant and relatively mainstream, most commercial software and games choose it as reference/supported platform. If Linux wasn't enough individualism, I'd maybe have chosen something more exotic). As a unix (like OS X) it is especially nice for (Ruby) programming which is a bit less integrated on Windows. And a small gem is that scrolling in SketchUp doesn't require a mouse-click into the viewport/component browser/etc. first.
I suppose the performance question is about SketchUp on both platforms. There is a little but for me not very noticeable tradeoff, but Wine is not a "real" emulator and not laggy like for example BlueStacks (Android), it is rather a (Windows) API that just passes calls through to the unix system.
Wine can mimic different Windows versions (and bitness) side by side. What I meant as tricky is that it defaults to a 32bit Windows where clicking a 64bit installer would fail obviously, and you have to tell it to mimic a 64bit environment. We are about to update the SketchUp sages pages soon and will include the exact steps.
-
RE: Windows 10
I don't use LayOut much, but I can create pages and insert models, annotate, double-click to change the 3d view like in SketchUp, export dwg, pdf, etc. (But it wasn't very stable 1–2 years ago.) The 32bit versions install straight-forward, but the 64bit versions of both are a little tricky at installation.
-
RE: Windows 10
@numerobis said:
30 Ways Your Windows 10 Computer Phones Home to Microsoft
One chooses what one likes… Choices can evolve or return to what one finds fits best. That's ok.
@kaas said:
Google-ing for 'SketchUp Layout Linux' results in quite some posts where people only can start SketchUp with ruby disabled AND Layout doesn't work at all etc…
Wine is a quickly moving target. What you find on the Internet about Wine is likely to be outdated (because the internet always keeps what it ever had). Most current info can be obtained by from someone who uses it, or by just trying out. The Ruby 2.0 interpreter (which was a problem only in 2014+), has been fixed now for almost a year. Both Layout and SketchUp (6 years) work well for me for daily use. For those who see this as an option, it is available.
However it's unlikely that SketchUp and Trimble ever change their platform strategy, because
- the current SketchUp is a legacy application in maintenance mode, a multi-platform strategy would have required other technology decisions much earlier
- there are too many M** fanboys in the SketchUp team
- platform pluralism and vendor independence play a higher role in european and many non-US countries (Brazil!), which lead to alternatives reach some relevance there (home computers, administrations, schools). Although Trimble once had a series of field computers based on Linux, they are however a rather traditional company and just exploring growing to outside the United States.
It's likely the world and technology changes faster (and turns this demand irrelevant) than that this demand will be met anytime soon. Looking forward to what SketchUp brings in the future!
-
RE: Webdialog and ActiveXObject
@bomastudio said:
but this approach doesn't work....I suppose that it's due to the "strHTML" string...may be because it isn't passsed as string but as other type? I can't get any error or warning....I can't understand....
You are in an (almost) dead end road. You can not pass a whole document over a 'skp:' protocol url, because there are (among more) these issues:
- As soon as the string contains a single quote
'
it does not arrive on the Ruby side, but SketchUp causes a SyntaxError. - any other Unicode characters in urls must be url-encoded. Multiple backslashes can however still be dropped even if properly escaped (!)
- urls in Internet Explorer have a maximum length of 2083 characters (and urls in general in other browser engines are unlikely to support a million characters)
Because this way of transfering data (skp:
with parameters after@
) is so utterly broken, you should not attempt to build your own (probably flawed) workarounds. You will also meet problems and have a lot of bugs in your code with failed parameter parsing/unserialization (because it involves). I strongly recommend to avoid this by using an already designed, proper webdialog communication library, like many developers use. Don't duplicate effort, but re-use. Look at what others use, look at their code. At the moment there is SKUI on github, and I have been working for some months on making the one I use in my plugins standalone and re-usable (soon released).
- As soon as the string contains a single quote
-
RE: [Plugin] Snapshot – (1.0.1) — updated 09.10.2012
The original plugin was not able to do a screen clipping/cropping. When SketchUp exports images of the current view, they always include the whole viewport. But you can set the pixel dimensions of the image.
If someone really needs all the options of the original plugin, it is still downloadable. Otherwise you create a toolbar button with a code snippets using ToolbarEditor. This is much easier to support, and it is easier to adapt to your specific needs.
This snippet asks for the file name and image dimensions. If you choose a filename with png or tif, the image will have transparency.
model = Sketchup.active_model view = model.active_view ro = model.rendering_options filepath = UI.savepanel("Save Image File", nil, "BMP|*.bmp;|JPG|*.jpg;*.jpeg|PNG|*.png|TIF|.*tif;*.tiff|TGA|*.tga||") width, height = UI.inputbox( ["width", "height"], [view.vpwidth, view.vpheight], "Size of the screenshot") unless filepath.nil? || width.nil? || height.nil? is_transparent = filepath[/\.(png|tiff?)$/i] if is_transparent drawGround, ro["DrawGround"] = ro["DrawGround"], false drawHorizon, ro["DrawHorizon"] = ro["DrawHorizon"], false end keys = { ;filename => filepath, ;width => width, ;height => height, ;antialias => true, # or false ;compression => 0.9, # Only for jpeg ;transparent => true # Only for png } begin raise unless view.write_image(keys) Sketchup.status_text = "A snapshot has been saved as #{filepath}." rescue Exception => e Sketchup.status_text = "Failed to save snapshot to #{filepath}. #{e.message}" end if is_transparent ro["DrawGround"] = drawGround ro["DrawHorizon"] = drawHorizon end end
-
RE: How to use .skp files in android mobile with basic tools?
You can not work with skp files directly on other devices/systems than what the SketchUp client and SDK support. (That is Intel 32 and 64 bit architecture, OS X and Windows. No other developer has influence on that because these are products/software components from Trimble SketchUp.)
All apps that allow to view/measure SketchUp files work the way that you first export from the desktop SketchUp version to their own file format (or upload to their cloud service). These files can then be loaded and opened on the mobile device.
See here for a list: https://sites.google.com/site/sketchupsage/resources#TOC-Presentation-and-Viewing
I didn't see one that has measurement tools, but TurboViewer has annotations. -
RE: Has anyone noticed the progression to a 'cashless' economy?
Interesting how this discussion has so far focussed much at Paypal.
Has anybody thought about these points:
Basic right for an accepted currency
Currently cash plays the role of an (almost) universal currency, at least within a monetary union and for medium prices. If leave your home with enough value of cash in your pocket, you can feel relaxed that you can buy everything without the risk of being unable to pay (having enough amount but of incompatible type). Every member of a society can take part in using that common denominator currency (just by getting cash in exchange, or finding it on the street). No registration or identification or income statements necessary.Neutrality
Other ways of payment often have a third party in the middle, which requires additional trust, agreement between payment services, and compatibility of their proprietary payment systems/pay cards/APIs. As long as systems aim for competition and exclusion (diverse credit card systems, Google/Apple Pay, Paypal which is not under banking law!), they are good as option but not suited as common denominator. Once cash will not be universally accepted anymore, it needs a successor, which ideally would be neutral and unbiased without giving advantage or control to specific companies over others.Data minimization
I have bought ice cream, the ice cream seller got his money and I got my ice cream, but nothing else was exchanged and we didn't know each other and will never know. I even have stayed in hotels anonymously. Not that data minimization or anonymity is crucial (as it would be for presecuted people like E. Snowden), but it guarantees that a moment of life has fulfilled all what it was supposed to (satiation) and that everything else can get forgotten, without future consequences (like some big company logging somewhere forever that you have eaten ice cream). -
RE: Saving Settings & Add-Ons When Upgrading OS.
If you really "just" upgrade (as you describe), your preferences and user data should stay untouched, even Windows has become capable of this nowadays. If you instead prefer to wipe all and fresh install, it is indeed needed to backup and restore all data you want to retain. Note that beta software is by definition unfinished, and third-party support (graphic drivers) may not be available or not in usual quality. Beta software is not intended for normal end users.
In any case, having backups is save:
- Make sure you save the SketchUp installer that you want (only the current versions are downloadable at any time).
- Backup your SketchUp user data (plugins, components etc.):
%(#000000)[%USERPROFILE%\Application Data\SketchUp\SketchUp 2015\SketchUp]
(In older versions this is in the program folder.) - BackUp your SketchUp preferences from the registry (only if you feel comfortable using the registry)
Open "regedit", navigate to the hive "%(#000000)[HKEY_CURRENT_USER\Software\SketchUp\SketchUp 2015]
" and Registry → Export it to a file.
-
RE: Maybe SU-2017
It will maybe run and display as a 2d window (just like the video player in the hololens demo), just like you could bring SketchUp on a smart watch (using an x86 emulator with Windows XP) or on a Google Glass (using an emulator or remote desktop) with gesture/touch input translated to single point 2d mouse events.
It does not make SketchUp fit to new screen sizes or support new kinds of interactions.
It would be interesting to see if (and in what areas) SketchUp takes the chance to innovate again and take up such technologies early (of course it's safer to let the big guys innovate, and follow the latest possible when mainstream has adopted 64bit, multitouch, hidpi, web-technologies). Also I wouldn't expect it to be the hololens, you know they have been working with Project Tango, and Trimble can make things possible…
-
RE: HTML form to pass parameters to Ruby, view online
Ruby is just a general purpose (mostly server) programming language. What you are concerned about (and what is more important) is whether the API in question is available for servers, in this case the graphical SketchUp application with its SketchUp API.
-
RE: SketchUp 2016 Wishlist
It "can" be achieved, but not reasonably good and usable. In fact I have this laying around for a couple of years. I'm not sure how useful it is (since resolution is very limited in SketchUp to 1024–2048px, and SketchUp does not have adaptive texture resolution techniques like Ptex). There are a couple of problems that would lead to undesired behaviors:
- Interactivity: SketchUp's API does not allow direct pixel manipulation, and saving images to disk and reloading takes a too big fraction of a second, and makes it feel very sluggish.
- Mousemove events: SketchUp signals only mouse positions in time steps. When the mouse hovers a face and then leaves it (to hover another face or empty space), it is hard to reconstruct the path that the mouse took in between, it requires a lot of intersections which had sometimes numerical errors.
- User workflow: The faces must be seamlessly textured before. This is trivial for planar projections, but in many cases users would need more advanced mapping techniques to avoid image stretching.
-
RE: Engineering Toolbox Stopped Working **SOLUTION**
This error is related to the use of the Prototype library's
Form.Element.Methods.getValue
(=$F
) which takes an element id string and returns the element's value (under the condition the element exists). The engineering toolbox generates element id strings from parameters (correctly to my view), but the corresponding elements seem not to exist. To find out more, one would need a stack trace and check the element ids at runtime.