[Plugin] Toggle Units

Re: [Plugin] Toggle Units

Postby simon le bon » Tue Jul 13, 2010 9:40 am

Dear Matt,

So glad to see you back on the block :thumb: :thumb: ;)

*s
-1
User avatar
simon le bon 
 

Re: [Plugin] Toggle Units

Postby blajnov » Tue Jul 13, 2010 10:11 am

Ken wrote:Is there anyone else that is having trouble with this plugin with Sketchup 7.1.6860. It will change the precision but not the units.

Thanks in advance.

Ken

Here's the working version. :thumb:
SketchUp Pro 7.1.6860
OS Windows 7 PC
0

blajnov 
 

Re: [Plugin] Toggle Units

Postby Ken » Tue Jul 13, 2010 11:20 am

Matt666 wrote:Hi all.
Sorry for the problems, and I don't have any time to search a solution... My work takes me a lot of time.
I will try to see what does not work with this new SU update.
Be patient please...



Matt

I know work. Was busy until recently. So now I was presented with some down time and in the process of trying to take care of some problems I had let slip. Food and shelter is always first on my list. So Matt666, let me thanks you for the script again.

blajnov, thank you for the updated. Not sure why I couldn't find this update on the site, but I couldn't. The scrip now works just like it did before. Not my plugin or my site, but maybe this update should go to the front of the topic. Anyway, again, thanks to all that helped.

Now lets hope the new cap works and work can start again.

Ken
0
Fight like your the third monkey on Noah's Ark gangway.
User avatar
Ken 
Premium Member
Premium Member
 

Re: [Plugin] Toggle Units

Postby Zante » Fri Aug 20, 2010 11:45 am

Please make your original post clearer (if editing is allowed on this forum).

2 files, same file name, no version control = confusion
0

Zante 
 

Re: [Plugin] Toggle Units

Postby RootlessAgrarian » Tue Oct 19, 2010 4:56 am

Matt666 wrote:Here is the script.
Toolbar to change drawing units quickly.


Hi -- I may not be understanding what this tool does, or how units work in Sketchup; I am frustrated because I can't do what seems to me a simple thing.

Here is the deal. I am working on a model in non-metric units (feet and inches). But I have paper sketches from a colleague in Norway who has annotated his drawings in decimal meters. I'd like to reproduce his hand drawing directly into my model by copying it exactly, so I'd like to work on a set of components in meters or mm. To my surprise I could find nothing in Preferences for toggling from metric to inch and back. So I thought that Toggle Units plugin might enable me to switch the whole model from inch to mm or cm.

I installed it. But it seems to toggle units only between different representations of inches (the first 4 buttons); the other buttons (mm, cm, mt) are grayed out and inactive. I really want to toggle between metric and inch -- is there no way to do this? it seems such an obvious thing to want to do :-) argh. would rather not have to use a unit converter and manually convert all the dims on my colleague's drawing!

btw I am aware that I can draw in any units I like, i.e. enter dimensions in notation like "3.0m". what I cannot do is use the Ruler tool to verify those dimensions after drawing, because the ruler is apparently hard-wired to inch units. if I could just toggle the Ruler between inch and metric that would be great!

any ideas would be gratefully received as this has got me bogged down right at the start of the project.
0
Nothing is 'mere'. -- Richard Feynman

RootlessAgrarian 
 

Re: [Plugin] Toggle Units

Postby RootlessAgrarian » Tue Oct 19, 2010 5:26 am

RootlessAgrarian wrote:
Matt666 wrote:Here is the script.
Toolbar to change drawing units quickly.


Hi -- I may not be understanding what this tool does, or how units work in Sketchup; I am frustrated because I can't do what seems to me a simple thing.


I read backwards in this thread and found that others have had some trouble with Leopard (OSX) and this plugin. I grabbed a more recent version edited by Jim Foltz Oct 2009 and installed that.

The Foltz version works except that the icons do not display: this I thought was because the icon paths were all set to CD_ICONS/TWEAK, but I substituted the correct path "toggle_units_icons" and I still get no icons in the toolbar. So I have to memorise the button sequence or wait for the balloon help to pop up :-) but the tool now does exactly what I was hoping for: my ruler can be toggled to work in inches or meters, hooray.

If anyone can tell me why these lines of code

Code: Select all
cmd.small_icon = "toggle_units_icons/tudec16.png"
cmd.large_icon = "toggle_units_icons/tudec24.png"


do not correctly association the png files with the button, I'd like to know (I don't speak Ruby obviously). meanwhile I'll happily use the version with anonymous blank buttons -- project no longer stalled!
0
Nothing is 'mere'. -- Richard Feynman

RootlessAgrarian 
 

Re: [Plugin] Toggle Units

Postby CadFather » Tue Oct 19, 2010 7:15 am

the lines make sense if you have the corresponding folder (toggle_units_icons) in the plugins menu..
0
Quarr-IT - SketchUp Training from the Master.. http://quarr-it.com/
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Toggle Units

Postby CAntonis » Tue Oct 19, 2010 8:52 am

Matt this is great!!!
Very nice plugin!

ThankU
CAntonis
0
User avatar
CAntonis 
 

Re: [Plugin] Toggle Units

Postby RootlessAgrarian » Tue Oct 19, 2010 8:50 pm

CadFather wrote:the lines make sense if you have the corresponding folder (toggle_units_icons) in the plugins menu..


plugins menu? or plugins directory (folder)?

that subdir does exist in the plugins directory (as do other subdirs of small images used successfully by other Ruby extensions). can't figure out why the images are not getting associated with the buttons. but hey, the unit switching function works and that's what I needed. I can fool around with the icons later.
0
Nothing is 'mere'. -- Richard Feynman

RootlessAgrarian 
 

Re: [Plugin] Toggle Units

Postby CadFather » Tue Oct 19, 2010 10:52 pm

sorry.. :oops: i meant plugins folder of course..

if the path is right the icons should show up
0
Quarr-IT - SketchUp Training from the Master.. http://quarr-it.com/
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Toggle Units

Postby RootlessAgrarian » Wed Oct 20, 2010 3:40 am

CadFather wrote:sorry.. :oops: i meant plugins folder of course..

if the path is right the icons should show up


as I say I do not speak Ruby, but I used to be extremely literate in Tcl/Tk and the syntax is not completely alien. I have tried various things, even using the full pathname. other .rb scripts are correctly finding their icons w/rel pathname starting at 'plugins', but this one for some reason is not. mysterious! I've looked for some initialisation that might set the default path, etc -- no luck so far. must be a very silly coding error that I can't see because I'm so unfamiliar with Ruby apps.

checked the obvious like protection bits on subdir and images, checked that they really are .pngs, checked that they are not empty files, etc. baffled.

oh well. something to fool with when I've nothing more urgent to do :-)
0
Nothing is 'mere'. -- Richard Feynman

RootlessAgrarian 
 

Re: [Plugin] Toggle Units

Postby vidy » Tue Jan 18, 2011 2:56 am

Have the same problem here also, the function was working perfectly, but the icon are invisible.. need some advice, please...

thanks,
0
still so much to learn..

vidy 
 

Re: [Plugin] Toggle Units

Postby chrisjk » Tue Jan 18, 2011 11:09 am

What versions of Mac OSX are you running? I have Snow Leopard and the icons do show up for me. You might need to check View>Tool Palettes>Toggle Units to see them.
0
Chris

chrisjk 
Premium Member
Premium Member
 

Re: [Plugin] Toggle Units

Postby vidy » Tue Jan 18, 2011 12:06 pm

im using xp sp2, and su 7.1, the tool actually already perfectly functional, just the icon not showed up..
already try to change the address on the script, but it still not working. :roll:
0
still so much to learn..

vidy 
 

Re: [Plugin] Toggle Units

Postby watkins » Wed Jan 26, 2011 4:11 pm

Just tried installing Toggle Units into my SU8 plugin folder, and found that the icons won't show up. Is this a known problem for SU8? If so, does anyone have a fix?

Kind regards,
Bob
0

watkins 
 

Re: [Plugin] Toggle Units

Postby TIG » Wed Jan 26, 2011 4:43 pm

When you extracted the contents of the zip file you should have got a file called toggle_units.rb and a folder called toggle_units_icons which contains 24 png files to make the various buttons.
The file and the folder both go into your Plugins folder.
If you have copied the rb file from v7 into v8 you must also copy the whole folder and its files too... :?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Toggle Units

Postby davidlouis » Wed Jan 26, 2011 6:43 pm

Not wanting to discourage the development of great tools such as this, I can't help wonder why, so far down the line in sketchup development, you can't have one preference for modelling units and a different one for the value readout of say... areas, dimensions etc etc... CAD software has been doing this since day one...

At the moment I model in millimeters and require dimensions and areas in meters... I've used this tool since it pretty much came but why don't the skp developers integrate this into the preferences / model info units interface...???

Either way thanks for a great tool! :thumb:

Dave
0
Last edited by davidlouis on Wed Jan 26, 2011 6:44 pm, edited 1 time in total.

davidlouis 
 

Re: [Plugin] Toggle Units

Postby watkins » Wed Jan 26, 2011 6:44 pm

Dear All,

Okay, Toggle Units is now working in V8, but only after installing the version posted by 'blajnov' (page 6 of this thread, and near the top).

Kind regards,
Bob
0

watkins 
 

Re: [Plugin] Toggle Units

Postby vidy » Fri Jan 28, 2011 2:39 am

watkins wrote:Dear All,

Okay, Toggle Units is now working in V8, but only after installing the version posted by 'blajnov' (page 6 of this thread, and near the top).

Kind regards,
Bob


dear bob,
do you have the icon showed up on v.8?
0
still so much to learn..

vidy 
 

Re: [Plugin] Toggle Units

Postby watkins » Fri Jan 28, 2011 11:37 am

Dear Vidy,

Yes I do, and I have checked all the functions and they work. It would be very useful if someone could update the first posting with the V8 compatible plugin.

Regards,
Bob
0

watkins 
 

Re: [Plugin] Toggle Units

Postby TIG » Fri Jan 28, 2011 5:51 pm

I have updated the first post in the thread viewtopic.php?p=81391#p81391
Please use the new 'bold' version which is v6/7/8... friendly - I left the old one BUT I don't recommend that version at all...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Toggle Units

Postby vidy » Sat Jan 29, 2011 2:40 am

thanks bob and tig, now it works perfectly :berserk:
0
still so much to learn..

vidy 
 

Re: [Plugin] Toggle Units

Postby Dave R » Sat Jan 29, 2011 1:16 pm

TIG,

I just installed the latest version but I am getting the blank toolbar. In looking through the script I see what looks like the path to the PNGs shown as below. The icon folder is called "toggle_units_icons" but I wonder if it or the script should be modified. Or maybe I'm looking in the wrong place and have a different problem.

Code: Select all
cmd = UI::Command.new(Strings["Decimal"]) { toggle_units(5) }
cmd.small_icon = "CD_ICONS/TWEAK/tudec16.png"
cmd.large_icon = "CD_ICONS/TWEAK/tudec24.png"
      
0
Inspecting mirrors is a job I could easily see myself doing.

If you are the smartest person in the room, you are in the wrong room.
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Toggle Units

Postby TIG » Sat Jan 29, 2011 4:18 pm

Dave R wrote:TIG,

I just installed the latest version but I am getting the blank toolbar. In looking through the script I see what looks like the path to the PNGs shown as below. The icon folder is called "toggle_units_icons" but I wonder if it or the script should be modified. Or maybe I'm looking in the wrong place and have a different problem.

Code: Select all
cmd = UI::Command.new(Strings["Decimal"]) { toggle_units(5) }
cmd.small_icon = "CD_ICONS/TWEAK/tudec16.png"
cmd.large_icon = "CD_ICONS/TWEAK/tudec24.png"
      

You are right :roll: - I copied the files over without looking at then [I didn't use this tool at all]
I've now updated the zip viewtopic.php?p=81391#p81391 so that it has the correct folder specified for the icons !
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Toggle Units

Postby Dave R » Sat Jan 29, 2011 5:17 pm

Thank you, TIG. I'm amazed that I sorted out the problem correctly. I must be learning from watching you.
0
Inspecting mirrors is a job I could easily see myself doing.

If you are the smartest person in the room, you are in the wrong room.
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Toggle Units

Postby Matt666 » Thu Feb 24, 2011 8:45 am

Hi all.
Sorry for my absence, for now I don't often use SU. Thank you TIG to be here... :oops:
0
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units

Postby mag1800 » Thu Apr 07, 2011 6:11 am

Great Plugin Matt. Works great for me. Thank You.
0

mag1800 
 

Re: [Plugin] Toggle Units v2.1

Postby Matt666 » Mon Sep 12, 2011 8:32 am

Hi all.
Plugin updated with a new tool (Toolbar manager): You can now choose icons you want to display in the toolbar.
Thanks to Thomthom and TIG!

LINK: viewtopic.php?p=81391#p81391
0
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units v2.1 (20110912)

Postby Matt666 » Wed Sep 14, 2011 12:06 pm

Do not hesitate to tell me if something goes wrong... I'm new with HTML and JAVASCRIPT...
0
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units v2.1 (20110912)

Postby driven » Wed Sep 14, 2011 1:00 pm

Hi Mat,

on my mac if I instal this correctly and open SU

Unless, I use the manager, make a change and then quit

SU actually crashes when I close a window and I get a report dialog.

When I remove this ruby, everything works as it should, if put it back again problem returns.

it make no difference if I use or don't use the plugin, only if it's installed.

28 com.google.sketchupfree8 0x004a9316 std::vector<CSketchUpToolbar::CToolBarItem, std::allocator<CSketchUpToolbar::CToolBarItem> >::_M_insert_aux(__gnu_cxx::__normal_iterator<CSketchUpToolbar::CToolBarItem*, std::vector<CSketchUpToolbar::CToolBarItem, std::allocator<CSketchUpToolbar::CToolBarItem> > >, CSketchUpToolbar::CToolBarItem const&) + 1968
29 com.google.sketchupfree8 0x004aa4ab std::vector<CSketchUpToolbar::CToolBarItem, std::allocator<CSketchUpToolbar::CToolBarItem> >::_M_insert_aux(__gnu_cxx::__normal_iterator<CSketchUpToolbar::CToolBarItem*, std::vector<CSketchUpToolbar::CToolBarItem, std::allocator<CSketchUpToolbar::CToolBarItem> > >, CSketchUpToolbar::CToolBarItem const&) + 6469
30 libCommonUtils.dylib 0x00a8538a CNotificationCenter::SendNotification(char const*, void*) + 202
31 com.google.sketchupfree8 0x004c1d48 non-virtual thunk to CTool::~CTool() + 3048
32 com.google.sketchupfree8 0x004c27c3 non-virtual thunk to CTool::~CTool() + 5731
33 com.google.sketchupfree8 0x00008335 0x1000 + 29493


john
0
learn from the mistakes of others, you may not live long enough to make them all yourself...

driven 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Plugins

Who is online

Users browsing this forum: No registered users and 12 guests

Visit our sponsors: