[Plugin] Toggle Units

Re: [Plugin] Toggle Units

Postby jiegou » Sat Aug 09, 2008 1:27 pm

very good!thanks. :sketchstatic:
0

jiegou 
 

Re: [Plugin] Toggle Units

Postby Matt666 » Wed Oct 01, 2008 12:17 pm

Edson wrote:no change, matt. still not working on mac. i click on the icons and nothing changes; it keeps the unit set through model info-->units.

Hi !
I go back on this plugin, with another attempt for Mac users. Edson, Can you try please? ;)

EDIT1 : One other (And I hope the last !) update!
0
Last edited by Matt666 on Thu Dec 11, 2008 4:26 pm, edited 1 time in total.
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units

Postby Matt666 » Thu Dec 11, 2008 8:05 am

Can someone test this last one on Mac, please ?
0
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units

Postby Edson » Thu Dec 11, 2008 11:49 am

still not working on my mac. nothing changes after i click on any icon. and btw, the meter icon is not showing.
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

Re: [Plugin] Toggle Units

Postby CadFather » Thu Dec 11, 2008 12:56 pm

..on pc that happens only if fractional or engineering is selected - once i click on decimal (from the toggle units icons) all icons become selectable and everything works..

i think we really need some 'certified mac testers'.. (or they may be left behind) ;)
0
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Toggle Units

Postby Matt666 » Thu Dec 11, 2008 2:15 pm

+1 for certified mac testers!
Sorry Edson for that and thank you so much to loose some time for script testing ! :D
0
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units

Postby Edson » Thu Dec 11, 2008 2:38 pm

Matt666 wrote:+1 for certified mac testers!
Sorry Edson for that and thank you so much to loose some time for script testing ! :D


no problem, matt. it is a pleasure to be of help. could you be more specific as to which is the build to be tested? i looked at the first post of this thread and saw nothing different there.
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

Re: [Plugin] Toggle Units

Postby Matt666 » Thu Dec 11, 2008 3:21 pm

Yep! On Fedo6 advices, I changed the way that script called preferences units...
So we have to try some things...
Open your ruby console, copy and paste code below and can you show me the result please ?
Code: Select all
toggle_units(1)
And
Code: Select all
Sketchup.active_model.options["UnitsOptions"]["LengthUnit"]
And
Code: Select all
var = Sketchup.active_model.options["UnitsOptions"];var["LengthUnit"]= 4
And this one (can you replace "VAR" by result of the last code entered, please ?
Code: Select all
toggle_units_validation_proc(<VAR>)

Another thing : When does error message appears? While start of SU? After clicking on an icon?

Sorry for all these tests, but it's necessary if I want to find the problem!
Thank you Edson!
0
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units

Postby Edson » Thu Dec 11, 2008 3:55 pm

matt,

do no be sorry. just keep the tests coming.

see the results in the attached picture. i do not get any error messages. it just does not change units.

cheers.
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

Re: [Plugin] Toggle Units

Postby Matt666 » Thu Dec 11, 2008 4:13 pm

:shock: toggle_units(1) works!! Try toggle_units(1), toggle_units(2), toggle_units(3) etc... And take a look in the units window (Windows->Model info->Units), normally drawing unit changes...
So I will post an update soon with toolbar code changed! Thank you Edson !
0
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units

Postby Matt666 » Thu Dec 11, 2008 4:27 pm

Ok, I've finished this update! Can you try it, Edson, please? Thank you!
0
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units

Postby Edson » Thu Dec 11, 2008 6:34 pm

matt,

good news from the mac side of life. it works. however, in order to see the change in the info panel i must close it and open it again (not a big problem).

what could be improved is the fact that the icon bar does not reflect the present units chosen. see the picture: i have decimal and centimeters on it but the icon bar is not reflecting it. sometimes it is all gray, others white. the buttons seem to "stick".

but we made some progress.
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

Re: [Plugin] Toggle Units

Postby Matt666 » Fri Dec 12, 2008 11:06 am

Wow... Strange!
Thank you Edson! We will slowly succeed! :D

Another request, please... A daunting request...

Can you open your ruby console and your units window (in model info), please?
Copy and paste code below in the ruby console
Code: Select all
Sketchup.active_model.options["UnitsOptions"]["LengthFormat"]

Change unit format, paste the code in the ruby console and give me the result like that :
Unit format (decimal, Architectural) -> result of the code

Can You do that for all SU unit Format please? :P

The same thing for units length... With this code :
Code: Select all
Sketchup.active_model.options["UnitsOptions"]["LengthUnit"]


Here is units options in SU/Windows :
Unit Format
  • Architectural -> 1
  • Decimal -> 0
  • Engineering -> 2
  • Fractionnal -> 3

Unit Length
  • Inches -> 0
  • Feet -> 1
  • Millimeters -> 2
  • Centimeters -> 3
  • Meters -> 4

Thank you Edson!
0
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units

Postby Edson » Fri Dec 12, 2008 12:03 pm

sorry, max. it may seem clear to you but i am not getting what i am supposed to do. lead me through it, ok?

after i paste Sketchup.active_model.options["UnitsOptions"]["LengthFormat"] what do i do? where do decimal and meters go? with or without quotation marks, etc? and where do i insert the unit options?

write down one of the options and i will figure out the others.

cheers.
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

Re: [Plugin] Toggle Units

Postby Matt666 » Fri Dec 12, 2008 12:29 pm

Sorry :oops: !
Procedure :
For all units format (decimal, architectural, engineering, Fractional) -> N°1 on the picture
  1. Change the format in the unit SU window (N°1)
  2. Copy, paste and excecute the code in the ruby console (N°3)
    Code: Select all
    Sketchup.active_model.options["UnitsOptions"]["LengthFormat"]
  3. Show me the result of the code in the ruby console Like my last post.

For all units length (Inch, feet, millimeters, centimeters, meters) -> N°2 on the picture
  1. Change the length in the unit SU window (N°2)
  2. Copy, paste and excecute the code in the ruby console (N°3)
    Code: Select all
    Sketchup.active_model.options["UnitsOptions"]["LengthUnit"]
  3. Show me the result of the code in the ruby console Like my last post.

If it's too constraining for you, don't hesitate to tell, I understand :D
Sorry again, Edson!
0
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units

Postby Edson » Fri Dec 12, 2008 12:46 pm

gotcha! is this it?
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

Re: [Plugin] Toggle Units

Postby Matt666 » Fri Dec 12, 2008 12:50 pm

Great ! The only problem is that it's the same thing as Window.... I d'ont understand your (Big) Mac Bug.... :evil: :evil: :evil:
Thank you Edson!
0
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units

Postby Matt666 » Wed Jan 21, 2009 10:29 am

Edson wrote:matt,
good news from the mac side of life. it works. however, in order to see the change in the info panel i must close it and open it again (not a big problem).
what could be improved is the fact that the icon bar does not reflect the present units chosen. see the picture: i have decimal and centimeters on it but the icon bar is not reflecting it. sometimes it is all gray, others white. the buttons seem to "stick".
but we made some progress.

Just one thing... With this update, can you try this :
Sans titre 1.jpg

  1. Draw a line
  2. Create a dimension entity of this line
  3. Try to change units in the toolbar...
Is the dimension change ?
On windows, dimension changes each time you change units...
0
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units

Postby Edson » Wed Jan 21, 2009 11:47 am

matt,

yes, the dimensions change. the functionality is now perfect.
Picture 14.png


however, the buttons stay in "pressed" mode even when you change units. check below: after testing the meter button, i clicked on cm and then mm. all of them stayed as if they were active. would there be a way for making only the active unit's button to show as such?
Picture 15.png
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

Re: [Plugin] Toggle Units

Postby Matt666 » Wed Jan 21, 2009 11:57 am

Ok cool! Thank you!
Do you have any error in the ruby console?
0
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units

Postby Edson » Wed Jan 21, 2009 12:09 pm

no errors.
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

Re: [Plugin] Toggle Units

Postby ken » Sat Jan 24, 2009 5:14 pm

Sir

Matt666 your Plugin Toggle Units is very useful and I use it all the time when I get marine vessels in metric and diving equipment in Imperial.

Just one question, would it be possible to add up and down precision buttons, so with a mouse selection, one could change the precision of the display either up or down as required?

Thanks in advance and again thanks for the very useful plugin.

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 Matt666 » Sat Jan 24, 2009 7:27 pm

Hi Ken.
in the first post, a new tool has been added. The last with 11 icons.
Enjoy !
0
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units

Postby CadFather » Sat Jan 24, 2009 8:13 pm

Hi Matt, will do some new icons soon for all eleven (didn't like the other ones) :)
0
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Toggle Units

Postby Matt666 » Sat Jan 24, 2009 11:27 pm

Cool!
0
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units

Postby ken » Sun Jan 25, 2009 12:13 am

Hi Matt

Thanks. As you can see from my avatar, I design in flat steel plate, and 1/8” is close enough for welders.

Your response was faster service than I had at the restaurant I just returned from. Hope others find this helpful.

Again much thanks.

And on a side note, my youngest daughter is trying to be an exchange student to France this summer. She is taking French in HS this year. I know if she gets to go, she will have a great time.

Again thanks

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 Matt666 » Sun Jan 25, 2009 12:31 pm

I know if she gets to go, she will have a great time.

Sure! :D
Where will she want to go in France?
0
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units

Postby ken » Sun Jan 25, 2009 5:45 pm

Matt

See will find out in the next two weeks if she is accepted and where exactly where she is going.

Thanks for asking

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 Matt666 » Tue Jan 27, 2009 1:22 pm

I've updated first post with a new tool and new icons by CadFather! Thank you Max!
Edson or Thomthom, does this version work on Mac?
0
Frenglish at its best !
My scripts

Matt666 
 

Re: [Plugin] Toggle Units

Postby Edson » Tue Jan 27, 2009 6:17 pm

i am afraid only the three added features work. the rest does not (but was working perfectly before). no error in the ruby console.
0
edson mahfuz, architect | porto alegre • brasil
http://www.mahfuz.arq.br
User avatar
Edson 
Global Moderator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Plugins

Who is online

Users browsing this forum: GeorgeSafiArch, refa3y, tyleral and 28 guests

Visit our sponsors: