Extension Store v3.0

The ideal place for beginners to get help using SketchUp

Re: Extension Store v3.0

Postby bimbachi » Tue Feb 12, 2019 4:07 pm

Hi, can I ask please my bundels to be deleted. I need rebuild to last set.
Thanks
0

bimbachi 
 

Re: Extension Store v3.0

Postby Gábor » Tue Feb 12, 2019 4:44 pm

bimbachi wrote:Hi, can I ask please my bundels to be deleted. I need rebuild to last set.
Thanks

Done
1

Gábor 
 

Re: Extension Store v3.0

Postby dtrarch » Fri Feb 22, 2019 8:24 pm

Rich et all
What version of the Extension Store will work with SU 8.0.16846?
I get this error message using rbz-zip- and manual install of SketchUcationTools_v3.1.6 and SketchUcationTools
Install note indicated it would work with latest v3.0
???? :?:
Thanks to all

dtr
0

dtrarch 
Premium Member
Premium Member
 

Re: Extension Store v3.0

Postby TIG » Fri Feb 22, 2019 8:38 pm

The guidance actually says, "Use v3.0 >v8, or stick with v2.6 for earlier SketchUp"
So you should use v2.6 in v8...
Where ">v8" means "greater-than-v8" - so you need to stick with v2.6, because newer versions are incompatible.
Remember that v8 is no longer supported by SketchUp and many extensions...

If you can't find an earlier RBZ or set of files, then perhaps Gábor can dig one out of the dust...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Extension Store v3.0

Postby dtrarch » Fri Feb 22, 2019 9:14 pm

Thank you TIG I should have looked more carefully at the instructions
Gabor or anybody
A copy of SketchUcation 2.6.1
I have a project in mind for the SU 8 users as a new thread
:!:
Thanks again

dtr
1

dtrarch 
Premium Member
Premium Member
 

Re: Extension Store v3.0

Postby dtrarch » Fri Feb 22, 2019 9:51 pm

:thumb: :thumb:
Thanks to all for checking this out and help
I found the plugins
v2.5.1
v2.6.0
v2.6.1
v2.6.2
If anybody needs one of these just ask

dtr
0

dtrarch 
Premium Member
Premium Member
 

Re: Extension Store v3.0

Postby Gábor » Sun Mar 03, 2019 3:27 pm

For SU 2019 compatibility and fixes to SketchUcation license issues, please download the latest (3.1.7) version from the PluginStore https://sketchucation.com/pluginstore?p ... ationTools
0

Gábor 
 

Re: Extension Store v3.0

Postby andybot » Sun Mar 03, 2019 10:25 pm

Hooray for Extension Store! It's such a great way to keep my plugins coordinated and updated across my different machines. Just wanted to say thanks! :)
2
my blog featuring recent projects
User avatar
andybot 
Premium Member
Premium Member
 

Re: Extension Store v3.0

Postby slbaumgartner » Wed Mar 06, 2019 9:43 pm

I just noticed that on my Mac (macOS 10.14.3) running SketchUp 2019 the SketchUcation tools My Shortcuts panel comes up empty every time. It shows the main menu items but nothing below any of them. The shortcuts are definitely there, they all work as expected, and typing model.get_shortcuts in the Ruby Console shows them all.

Edit: forgot to mention, I just downloaded and installed the latest version of the toolset in case that was the issue.
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Extension Store v3.0

Postby TIG » Wed Mar 06, 2019 11:24 pm

There are 3 versions of the code to pass the user's shortcuts to the server side...
For PC:
p myscuts = Sketchup.get_shortcuts.sort.join("\\n")
For MAC >= 2018
txt = IO.read(File.join(File.dirname(Sketchup.find_support_file("Plugins")), "SharedPreferences.json"))
txa = txt.split(' "Settings": {')[1]
txb = txa.split(' },')[0]
txc = txb.split(",\n")
txc.dup.each{|e| txc.delete(e) if e=~/Num_Shortcuts/ }
tcd=[]
txc.each{|e| tcd << e.split(":")[1..-1].join(':').gsub(/["]$/, '').chomp }
### and more...
p tcd

For older MACs:
txt = IO.read(File.join(File.dirname(Sketchup.find_support_file("Plugins")), "Shortcuts.plist"))
txt.gsub!(/[>] [<]/, '>Space<')
txt.gsub!(/[>]0[<]/, '><')
txt.gsub!(/#{"\t"}/, '')
txt.gsub!(/#{"\n"}/, '')
txt=txt.split("<array><string>")[1]
txt=txt.split("</string></array>")[0]
txt.gsub!(/[>]131072[<]/, ">Ashift<")
txt.gsub!(/[>]262144[<]/, ">Ctl<")
txt.gsub!(/[>]393216[<]/, ">Ctl+Ashift<")
txt.gsub!(/[>]524288[<]/, ">Opt<")
txt.gsub!(/[>]655360[<]/, ">Opt+Ashift<")
txt.gsub!(/[>]786432[<]/, ">Ctl+Opt<")
txt.gsub!(/[>]917504[<]/, ">Ctl+Opt+Ashift<")
txt.gsub!(/[<]\/string[>][<]integer[>]/, "+++")
txt.gsub!(/[<]\/integer[>][<]string[>]/, "\t")
txt.gsub!(/[+][+][+]#{"\t"}/, "\t")
txa=txt.split("</string><string>")
txa.dup.each_with_index{|e, i|
km=e.split("\t")[0]
km=km.upcase if km=~/^[a-z]$/
cm=e.split("\t")[1]
if km =~ /[+][+][+]/
kk=km.split("+++")
kk[0]=kk[0].upcase if kk[0]=~/^[a-z]$/
km=kk.reverse.join("+")
end
txa[i] = km+"\t"+cm
}
myscuts = txa.sort.join("\\n")
myscuts.gsub!(/#{"\t/"}/, "\t")
### and more...
p mycuts

You can see the whole code in the Plugins/SketchUcation subfolder file SCF-myShortcuts.rb

I don't have access to a MAC at the moment - please could you test on yours ?

Has the MAC's plist migration to the .json file changed again ?
The idea is to pass the code to the server in similar ways to PC - but it was always harder than on PC...

Any help appreciated...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Extension Store v3.0

Postby slbaumgartner » Thu Mar 07, 2019 12:17 am

When I run the >= 2018 snippet, I notice that every element of the tcd Array starts with a (unmatched) double-quote but otherwise it correctly read the json file. I haven't looked yet at how the Array is subsequently processed, but I suspect that leading quote is messing it up. Most likely the split statements are just a bit off. Here's a sample of that part of my json file. Maybe it will tell you what needs fixing:

"Settings": {
"Num_Shortcuts": 46,
"Shortcut_1": "0 0 0 selectSelectionTool:",
"Shortcut_10": "0 0 0 M selectMoveTool:",
"Shortcut_11": "0 0 0 Q selectRotateTool:",
"Shortcut_12": "0 0 0 S selectScaleTool:",
"Shortcut_13": "0 0 0 H selectDollyTool:",
"Shortcut_14": "0 0 0 Z selectZoomTool:",
"Shortcut_15": "0 0 1 Z viewZoomExtents:",
"Shortcut_16": "0 0 0 E selectEraseTool:",
"Shortcut_17": "0 0 0 K toggleDisplayBackEdges:",
"Shortcut_18": "1 0 0 L /Extensions/JF Add Layer",
"Shortcut_19": "0 0 0 D selectDimensionTool:",
"Shortcut_2": "0 0 0 G makeComponent:",
"Shortcut_20": "1 0 0 D /Extensions/Move Dimensions to Layer",
"Shortcut_21": "1 0 0 V pasteInPlace:",
"Shortcut_22": "0 0 0 Y viewParallelProjection:",
"Shortcut_23": "1 0 0 Y viewPerspective:",
"Shortcut_24": "0 0 0 U pageUpdate:",
"Shortcut_25": "1 0 0 H viewShowHidden:",

Here's what the ruby code ends up with for myscuts:
> myscuts
A Draw/Arcs/2 Point Arc\nAshift+G Other/toggleHideSimilarComponents:\nAshift+Z Camera/Zoom Extents\nB Tools/Paint Bucket\nC Draw/Shapes/Circle\nCtl+A Other/select3PointFitArcTool:\nCtl+Ashift+A Other/selectArc3PointTool:\nCtl+D /Extensions/Move Dimensions to Layer\nCtl+G Other/toggleHideRestOfModel:\nCtl+H View/Hidden Geometry\nCtl+L /Extensions/JF Add Layer\nCtl+T /Tools/Trim Keep\nCtl+V Edit/Paste In Place\nCtl+W /Tools/TIG-weld\nCtl+Y Camera/Perspective\nCtl+Z /Edit/Context Menu Flyout/Zoom Selection\nD Other/selectDimensionTool:\nE Tool/Eraser\nF Other/selectExtrudeTool:\nG Edit/Make Component...\nH Camera/Pan\nK View/Edge Style/Back Edges\nL Draw/Lines/Line\nM Tools/Move\nO Tools/Offset\nOpt+A Other/selectArcPieTool:\nOpt+D /Tools/Get Dimensions\nOpt+G Other/eraseConstructionGeometry:\nOpt+L /Extensions/Cut List\nOpt+Q /Edit/Context Menu Flyout/Flip Along/Component's Red\nOpt+R /Edit/Context Menu Flyout/Flip Along/Component's Green\nOpt+S /Edit/Context Menu Flyout/Flip Along/Component's Blue\nOpt+T /View/Toggle Scene Transition\nP Tools/Push/Pull\nQ /Edit/Context Menu Flyout/Flip Along/Red Direction\nQ Tools/Rotate\nR /Edit/Context Menu Flyout/Flip Along/Green Direction\nR Draw/Shapes/Rectangle\nS /Edit/Context Menu Flyout/Flip Along/Blue Direction\nS Tools/Scale\nT Tools/Tape Measure\nTools/Select \nU Other/pageUpdate:\nX Other/toggleGlobalTransparency:\nY Other/viewParallelProjection:\nZ Camera/Zoom
>
Note: the forum software appears to have done some collapsing of tabs, newlines, and spaces compared to what I copy-pasted from the Ruby Console
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Extension Store v3.0

Postby Gábor » Thu Mar 07, 2019 11:21 am

@slbaumgartner: Until TIG comes back with a ruby-side solution it would be interesting to see what javascript receives from ruby on your computer.

So if you have the time could you please modify your SCF-myShortcuts.rb in a way that the URL at line 41 look this:

dlg.set_url("http://jroot.sketchucation.com/shortcutter/shortcutter_0_3_0_debug.html")

After saving the modification please re-start SU and start "My Shortcuts". The debug version should pop up a javascript alert with the data received from the ruby script. On my computer it looks like this:

ShortcutterDebug.JPG


Could you please make a screen copy of what your popup displays? After it you can reset the original URL at SCF-myShortcuts.rb.
0

Gábor 
 

Re: Extension Store v3.0

Postby slbaumgartner » Thu Mar 07, 2019 3:27 pm

Gabor, some strange is happening. I edited that line and there was no change. The inspect element debug window still shows the non-debug html being loaded.

I'm wondering: looking at the extension's folder I see both SCF-myShortcuts.rb and SCF-myShortcuts.rbs. Is that supposed to be the case? Is is possible that editing the rb has no effect because the rbs is being loaded preferentially? Is there some way other than restarting SketchUp that I need to flush a cache?

Edit: I can't say exactly what caused the change of heart, but suddenly just now I got this:
Edit2: It may be because I manually loaded the .rb file after editing it this time rather than restarting SketchUp...

Screen Shot 2019-03-07 at 9.42.50 AM.png
0
Last edited by slbaumgartner on Thu Mar 07, 2019 4:05 pm, edited 1 time in total.

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Extension Store v3.0

Postby slbaumgartner » Thu Mar 07, 2019 4:00 pm

I notice another kind of bug: someone at SketchUp decided on Mac to encode all regular keys as upper case and therefore to use available lower case letters for the function keys (!). This causes mis-processing of the shortcuts in your code. The encoding is:
p => F1, q => F2, r => F3,...etc. shift, control and alt modifiers are encoded using the same 0/1 columns as for other keys.
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Extension Store v3.0

Postby TIG » Thu Mar 07, 2019 5:30 pm

There should only be the RB file - I suspect the RBS comes from a much earlier version - please delete it.
A restart is needed to ensure the edited RB loads as SketchUp starts.

If you use the PC code for v2019 MAC what's the output ?
p myscuts = Sketchup.get_shortcuts.sort.join("\\n")

Without a MAC handy I'm a bit stuck with testing.
Thanks for the help thus far...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Extension Store v3.0

Postby Gábor » Thu Mar 07, 2019 5:32 pm

slbaumgartner wrote:Edit: I can't say exactly what caused the change of heart, but suddenly just now I got this:
Edit2: It may be because I manually loaded the .rb file after editing it this time rather than restarting SketchUp...


Thank you for the result. It seem to me that the java script gets the necessary data so I need to take a look at it why it is not displaying it properly.

I think the reason for failing to load the debug version was due to caching issues but luckily it was solved.

Will get back to you as soon as I could figure out something.
0

Gábor 
 

Re: Extension Store v3.0

Postby slbaumgartner » Thu Mar 07, 2019 5:33 pm

And another observation now that the My Shortcuts dialog is being populated: any path that starts with / is being omitted by the javascript side (the debug alert shows they are being passed from Ruby). So the displayed list is incomplete. Also, this might be deliberate?, but space invoking the Selection tool is not on the list. On Mac 2018 and 2019 it is encoded literally as a space character in the json, and that may be causing an error.
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Extension Store v3.0

Postby slbaumgartner » Thu Mar 07, 2019 5:39 pm

TIG wrote:There should only be the RB file - I suspect the RBS comes from a much earlier version - please delete it.
A restart is needed to ensure the edited RB loads as SketchUp starts.

If you use the PC code for v2019 MAC what's the output ?
p myscuts = Sketchup.get_shortcuts.sort.join("\\n")

Without a MAC handy I'm a bit stuck with testing.
Thanks for the help thus far...


Wow! The timestamps on that rbs and also SCF_pluginsFolder.rbs were Sept 2017. I can't explain where they came from, as I did a fresh install of the extension for SU 2019! I'll let you know what happens after I restart SketchUp.

Edit:
Deactivating the rbs files did the trick as to getting the desired version of the Ruby. Now on to debugging. I should note that I also turned off the up-casing of lower case keys so that the function keys come through.

The above (with an appended nil to avoid also printing the return value) gets:

> p myscuts = Sketchup.get_shortcuts.sort.join("\\n");nil
"A\tselectArcTool:\\nB\tselectPaintTool:\\nC\tselectCircleTool:\\nD\tselectDimensionTool:\\nE\tselectEraseTool:\\nF\tselectExtrudeTool:\\nF2\t/Edit/Context Menu Flyout/Flip Along/Red Direction\\nF3\t/Edit/Context Menu Flyout/Flip Along/Green Direction\\nF4\t/Edit/Context Menu Flyout/Flip Along/Blue Direction\\nG\tmakeComponent:\\nH\tselectDollyTool:\\nK\ttoggleDisplayBackEdges:\\nL\tselectLineTool:\\nM\tselectMoveTool:\\nO\tselectOffsetTool:\\nP\tselectPushPullTool:\\nQ\tselectRotateTool:\\nR\tselectRectangleTool:\\nS\tselectScaleTool:\\nSpace\tselectSelectionTool:\\nT\tselectMeasureTool:\\nU\tpageUpdate:\\nX\ttoggleGlobalTransparency:\\nY\tviewParallelProjection:\\nZ\tselectZoomTool:\\n⇧G\ttoggleHideSimilarComponents:\\n⇧Z\tviewZoomExtents:\\n⌃A\tselect3PointFitArcTool:\\n⌃D\t/Extensions/Move Dimensions to Layer\\n⌃G\ttoggleHideRestOfModel:\\n⌃H\tviewShowHidden:\\n⌃L\t/Extensions/JF Add Layer\\n⌃T\t/Tools/Trim Keep\\n⌃V\tpasteInPlace:\\n⌃W\t/Tools/TIG-weld\\n⌃Y\tviewPerspective:\\n⌃Z\t/Edit/Context Menu Flyout/Zoom Selection\\n⌃⇧A\tselectArc3PointTool:\\n⌥A\tselectArcPieTool:\\n⌥D\t/Tools/Get Dimensions\\n⌥F2\t/Edit/Context Menu Flyout/Flip Along/Component's Red\\n⌥F3\t/Edit/Context Menu Flyout/Flip Along/Component's Green\\n⌥F4\t/Edit/Context Menu Flyout/Flip Along/Component's Blue\\n⌥G\teraseConstructionGeometry:\\n⌥L\t/Extensions/Cut List\\n⌥T\t/View/Toggle Scene Transition"

Edit2: rats! Once again that got mangled by the forum's formatter due to the long line. I'll attach a file instead.
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Extension Store v3.0

Postby Gábor » Thu Mar 07, 2019 5:58 pm

slbaumgartner wrote:And another observation now that the My Shortcuts dialog is being populated: any path that starts with / is being omitted by the javascript side ....


Well it is an interesting observation and it is probably easily fixable either at ruby or at javascript side by simply chopping the leading /. But does anybody have any idea why in SU 2019 some actions begin with / while others don't?
0

Gábor 
 

Re: Extension Store v3.0

Postby slbaumgartner » Thu Mar 07, 2019 6:02 pm

Gábor wrote: But does anybody have any idea why in SU 2ö19 some actions begin with / while others doesn't?


Built-in commands get a symbol string such as selectLineTool: instead of a menu path such as /Tools/TIG-weld as used for extensions.
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Extension Store v3.0

Postby Gábor » Thu Mar 07, 2019 6:11 pm

slbaumgartner wrote:Built-in commands get a symbol string such as selectLineTool: instead of a menu path such as /Tools/TIG-weld as used for extensions.

Thank you for the fast answer. Am I right to I say that in previous SU versions it wasn't so?

Now that we know this difference between the built in commands and the extensions we could use this leading '/' to color the extensions with a different color if needed. What is your opinion? Would it be useful? If yes, tomorrow I can modify the javascript to do so.
0

Gábor 
 

Re: Extension Store v3.0

Postby slbaumgartner » Thu Mar 07, 2019 6:20 pm

I made two edits to the ruby file that eliminated a lot of the issues:
(line numbers may be off a bit due to my editing and insertion of comments...)

at around line 124 needed to be gsub! not just gsub
tce.dup.each_with_index{|e, i| tce[i].gsub!(/ /, ' <Space> ') }

at around line 161 I added at trap for paths with leading /
act = act[1..-1] if act[0]=='/'

at around line 187, commented out the following line:
#key=key.upcase if key=~/^[a-z]$/

Now it mostly works, with some remaining issues that are I think on the javascript side:
<space> is substituted correctly for the SelectionTool shortcut on the Ruby side but displays as a blank on the dialog

The lower case letters are displayed as such. Not a surprise since who knew they encoded function keys?

For some reason one of my shortcuts is missing. It was ctrl-Y for viewPerspective:
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Extension Store v3.0

Postby slbaumgartner » Thu Mar 07, 2019 6:27 pm

Gábor wrote:Thank you for the fast answer. Am I right to I say that in previous SU versions it wasn't so?

Now that we know this difference between the built in commands and the extensions we could use this leading '/' to color the extensions with a different color if needed. What is your opinion? Would it be useful? If yes, tomorrow I can modify the javascript to do so.


I took a look at one of the old plist files, and the paths were the same way there:

/topmenu/submenu/...

Interesting idea to color the extensions differently. There is already a hint in that the built-ins mostly use symbol strings ending in : though a) that is subtle and easy to miss, and b) there are some that don't follow that convention and would have to be trapped explicitly or something. For example /Edit/Context Menu Flyout/Flip Along/Red Direction. I wonder if it is just the context menu items that do that (those are the only ones I see in my own shortcuts)? That would make them easier to trap.
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Extension Store v3.0

Postby TIG » Thu Mar 07, 2019 6:28 pm

Thanks for the info...

Gábor

An Extension's menu item never starts with a / on PC - so e.g. it's Tools/TIG-Weld
If MAC [v2019 now?] adds a leading / - so e.g. it's /Tools/TIG-Weld - then all that is needed is that the SCF server-side's js ensures it doesn't get skipped ?

But is that the only issue ?
How are the three modifier keys getting resolved on a MAC ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Extension Store v3.0

Postby TIG » Thu Mar 07, 2019 6:36 pm

Here's version of the RB with those tweaks...
Please test and confirm - perhaps using the alternative http address - then Gábor can see what the js is doing...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Extension Store v3.0

Postby slbaumgartner » Thu Mar 07, 2019 6:40 pm

And another ruby side:

I changed the substitution for space from <Space> to just Space and now it shows up. Maybe it was being taken as an html element?

Also, I see that ctrl-Y is showing up, just not where I expected it. But I still see 45 listed whereas I have 46. I haven't figured out yet which one is missing!
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Extension Store v3.0

Postby slbaumgartner » Thu Mar 07, 2019 6:48 pm

TIG, with the additional change to Space instead of <Space> your version works.

Still chasing down which shortcut is missing. The Ruby side says it is passing 46 forward (I printed the length of myscuts array), so something must be going wrong on the javascript side?
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Extension Store v3.0

Postby TIG » Thu Mar 07, 2019 6:53 pm

Here's my updated RB with <Space> changed to Space.
Can/If you find the missing entry please let us know, so we can see if it's a Ruby or JS issue...

Then we can look at a formal update...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Extension Store v3.0

Postby slbaumgartner » Thu Mar 07, 2019 6:58 pm

Found it! The string for the eraser was coded as "Tool/Eraser" instead of "Tools/Eraser" in lines 91 and 131, which doesn't appear in the dialog because there is no Tool menu. With that final tweak it all seems to work!

Except, of course, the verbatim listing of function keys.
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Extension Store v3.0

Postby TIG » Thu Mar 07, 2019 8:00 pm

Well done.

Here's an updated version of the RB.

What needs doing about the modifier-keys ?
Server-side JS ??
0
TIG
User avatar
TIG 
Global Moderator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Newbie Forum

Who is online

Users browsing this forum: Bing [Bot] and 7 guests

Visit our sponsors: