At startup SketchUp 'always' loads all .RB files that it finds in your user's Plugins folder.
So simply having your Ruby code in a .RB file in that folder should load it, and also run any commands etc that it defines and chooses to run...
Your _dir_ is running into issues because by the time it runs it's returning nil.
What is your thinking behind this process ?
Posts
-
RE: Help needed with Sketchup.exe -RubyStartup
-
RE: Is there a way to "define the scale" of a group of objects in SketchUp?
You have misunderstood.
It works on your selection of 'containers' AND any 'containers' inside those etc, iterating...
As your later example shows too.
You just needed you to add in some of your scaling code... -
RE: Is there a way to "define the scale" of a group of objects in SketchUp?
Once you have a collection of selected 'containers' [groups and component-instances] you need to go though that array and do the same again to each 'container's' entities, selecting any new 'containers', repeat this until all nested 'containers' are got.
Here's an outline of an example...def miner(entities=Sketchup.active_model.to_a) containers = [] #an empty array entities.each{|e| next if ! e.is_a?(Sketchup::Group) || ! e.is_a?(Sketchup::ComponentInstance) containers << e.definition } containers.uniq! #ignore duplicates #process the containers containers.each{|e| #do scaling code on 'e'... } #containers is an array of selected groups and component-instances' definitions, #BUT not any that are nested. #Next go through the container.entities - #this repeats until there are no containers left to process. return nil unless containers[0] containers.each{|e| miner(e.entities) #repeats itself ! } end#def #run with miner(Sketchup.active_model.selection.to_a) after first making your selection... -
RE: [Plugin] FredoSection - v1.5c - 30 Jan 26
@Neodimium said in [Plugin] FredoSection - v1.3b - 27 Dec 25:
Hi.
Is there similar tool for SU2017?
And it doesn't need to be so advanced.My free SectioncutFace extension is compatible, it lets you apply a material to a simple section-cut face. If you unlock its group you can manually change its material. However, the material is not reliant on the cut container and manual changes are lost if the section is ever changed/remade. So this Fredo's new toolset is like its big, smarter brother...
-
RE: Is there a way to "define the scale" of a group of objects in SketchUp?
I'm not AI.
BUT I'll outline the steps for you...Run these snippets in the Ruby Console.
-
Find all 'containers' [i.e. groups and component-instances].
-
Decide if you want to process all of them in your model. OR those in a selection. Here are the two ways a and b.
3a. #code
model = Sketchup,active_model containers = model.definitions.to_a #an array of ALL groups and component definitions, including any nested ones.OR
3b. #codemodel = Sketchup.active_model selection = model.selection containers = [] #an empty array selection.each{|e| next if ! e.is_a?(Sketchup::Group) || ! e.is_a?(Sketchup::ComponentInstance) containers << e.definition } containers.uniq! #ignore duplicates #containers is now an array of selected groups and component-instances' definitions, BUT not any that are nested.- #use puts to see the results, e.g.
puts containersProcess [scale ?] the array of the 'containers' as you desire... one at a time e.g.
containers.each{|e| # whatever... } -
-
RE: Is there a way to "define the scale" of a group of objects in SketchUp?
If your AI is clever enough. you need to ask it how to process the entities inside definitions [i.e. components and groups] using an iteration...
-
RE: [Plugin] HouseBuilder
You seemingly haven't installed it from its RBZ.
If you simply copy the ../Plugins/HouseBuilder_extension.RB file over to the newer SketchUp version it misses the images to make the toolbar-buttons [and worse!]...
Unfortunately the original author was in the dim past [20years ago] and made a half-baked extension loader file, and he didn't give his subfolder the same name as the RB file.
The new[ish] auto-migration tool assumes this file/folder naming convention and so it misses out copying the subfolder of images [and some other vital support files that are in that folder].
To fix it you need to find the whole HouseBuilder folder [and its contents intact] in your older version's Plugins folder and copy that whole folder over into the newer SketchUp version's Plugins folder.
When you startup SketchUp it should now find the subfolder and load the buttons' images and the other vital support files... -
RE: SketchVault
Thanks for the update.
You saved me from doing the work !
Seems to work as it should with undo and so on.
Much better structured code-set.
The code # rem's are much more helpful.
It needs more guidance about the settings and what they do.
Also on how the 'red' mesh areas control the results.
Is the new mesh meant to be colored without any choice ?
It's neat, but perhaps not always wanted ?
You could add a simple checkbox option to the dialog - 'Color by Z height'
then skip that coloring part around line#279=#291 if it's set 'off'... -
RE: Curviloft Error - need version Libfredo6
Before trying the following please read the whole post as the answer might be a misunderstanding...
-
Use the SketchUcation ExtensionStore to install JointPushPull, FredoCorner and LibFredo6 again.
Then restart SketchUp to sync everything. -
If you are still getting the licensing error[s] check that you have installed the proper license for the extensions
- I suspect that you have a license for Fredo's RoundCorner and this is not the same as the installed FredoCorner, which expects a separate license file.
There have been a few reports of users confusing the two extensions and their respective licenses.
Although the two are similar in what they do, they are not identical, and they need to be licensed separately.
So ensure you have the correct extensions installed and their matching licenses validated,
after that a SketchUp restart should get both properly licensed and error free.
-
-
RE: [Plugin] SketchyFFD (mind.sight.studios)
Try visiting the owner's website and follow the instructions carefully.
The things you need to select to get the tool to work is a little complicated, but once you understand it it's pretty straightforward... -
RE: [Plugin] Multiple Offsets (Updated 09-Feb-2014)
v5 is now available in the PluginStore / ExtensionStore³
https://sketchucation.com/pluginstore?pln=Multiple_Offsets
It's now compatible with the newer SketchUp version's Ruby methods [e.g. 'FixNum' was deprecated in favor of 'Integer']
The RBZ is now also 'signed' to suit all Loading Policies... -
RE: [Plugin] Multiple Offsets (Updated 09-Feb-2014)
I was also looking ! It seems to be a simple issue with 'FixNum' being deprecated in the newer Ruby version, replaced by 'Integer'.
I'll edit the file and publish an updated version asap.
Under the author's
notice it's allowed... -
RE: [Plugin] Multiple Offsets (Updated 09-Feb-2014)
Any error messages in the Ruby Console ?
Are you following the detailed instructions.
It hasn't been supported for sometime - the author has stopped all development on his extensions.
Although it's old it has been reported as working in versions up to a few years ago... -
RE: Sketchucation Tools 5.0...
This error is very unexpected.
As SketchUp starts it loads from your Plugins folder the ../SketchUcation.rb file to set up the rest of the code.
This in turn loads ../SketchUcation/SCF_loader.rbe
Which makes the toolbars, menus etc, and loads the various other code files needed to work the extension.
It's failing at the loader's line#193 with the NameError uninitialized constant SCF::TOOLBARTOGGLEup
This is one of many Constants set up to set the text for the toolbar button's tool-tips etc.
Because earlier lines of code have already set 27 similar Constants like SCF::TOOLBARTOGGLE, without any errors I can't immediately see what might be causing this issue for you. These Constants are read in from a text file shipped with the set - ../Strings/SCF-EN-US.strings
I've checked them and the correct file is included in the file set archive 5.0.4
Since the TOOLBARTOGGLEup Constant was just added in for this revision, then it looks like you might have a earlier version of the strings file [e.g. <=5.0.3], that the needed newer 5.0.4 l, and the loadedr is then tripping up later as that particular Constant hasn't been defined.How did you install the newest version ? From the ExtensionStore dialog, or from a downloaded RBZ - if that. then how did you install the files/folders ? Using the Native Extension Manager's Install function should copy all over and overwrite any preexisting files etc - which it clearly has for the loader etc; or did you manually copy the RBZ's contents into your Plugins folder ? If you did that then maybe you inadvertently skipped the new strings file version ?
You can see if the existing installation for ../Strings/SCF-EN-US.strings is correct by opening it with Notepad++.exe and around line#31 TOOLBARTOGGLEup= .. defines the Constant. If it's there then something is weirdly adrift, as your other files aren't loading it: but I suggest that it will almost certainly be an older version with that liine missing.
If it is missing something when wrong with the installation - probably skipped that file's newer version etc - if so the some other files might also be suspect.
Please try SketchUp's Extension Manager Install function again and pick the 5.0.4 RBZ . After it installs that, then restart SketchUp and see if the error recurs...
Alternatively you can use a manual way - close SketchUp, then extract the RBZ's contents using 7-Zip or similar [an RBZ is a renamed ZIP file], then manually copy all of its contents - i.e. parts 1) the SketchUcation.rb file and 2) the subfolder SketchUcation [and of course all of that folder's contents intact - files and subfolders of more files etc. When prompted choose to Replace the 118 or so existing files [never Skip them]. Afterwards restart SketchUp to sync everything and see what happens...
Please let us know what happens... -
RE: SCFLicense: Extension Licensing on Sketchucation
With the latest versions of the SketchUcation tools installed you should see the options on our web page or in one of the settings tabs in the ExtensionStore dialog ?
If not Rich will probably be able to do something via admin... -
RE: Silly/Dumb Question about Guidelines
You can't do that in one step. Do this.
Use the Tape-measure tool to make the first at 1/2" as before click to confirm, Select the guide line, and chose the Move tool, press Ctrl to invoke Copying, make the copy off 1/2" and immediately type 9x press Enter to confirm.
Now you have 10 guides at 1/2" spacing.
You can make multiple offset copies of selected things, including guides, but you can use the Tape-measure tool to make more that one guide at a time.
You can also make radial copies at set angles using Rotate + Ctrl for Copy and entering the number needed, press enter.
It's probably best that when inputting lengths or angles to the use 9x rather than x9 as the leading letter might sometimes get confused with ab x shortcut.
To make guide copies at a set spacing, e.g. use 9x but if you want to divide between a start and end guide manually pick the start and the final one and use 9/ to divide - that way you don't need the exact dimension, but can be sure the spacings are all equal. -
RE: SketchVault
Majid
I'll look at it for you and send a fixed version by PM - it might be early next week...
-
RE: Bell keeps telling me 'You have updates' but update list is empty.
@Gábor needs to look at his server-side coding.
I expect the user-side would always be sending a list of all installed extensions and their versions, Gábor then checks if that user, on that computer, in that SUp version has previously installed any extension[s] in the current version available in the ExtensionStore, and if not it should advise that there's an update available, and list it on the appropriate page to auto-install... -
RE: Bell keeps telling me 'You have updates' but update list is empty.
Get v5.0.4 and install it, you can do that using the current v5.0.3 dialog, rather that via a download RBZ.
But why not try reinstalling LibFredo6 15.6a 'automatically' from the ExtensionStore dialog's main page.
Then after a SketchUp restart the update-available message should stop.
Incidentally, why do you think it's that LibFredo6 extension ? Is it the only one you installed 'manually' from a downloaded RBZ ? Why did you do that ? It appears that you might have confused the records server-side to think you still need to auto-install it for its records...
Thinking farther - aren't you seeing a update-available reminder for v5.0.4 itself in the v5.0.3 dialog ? Are you restarting SketchUp so that you get a refreshed set of data after any major extension change ??