[Plugin] Toggle Units
-
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.
-
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 ! -
@edson said:
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!
-
Ok, I've finished this update! Can you try it, Edson, please? Thank you!
-
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.
-
Wow... Strange!
Thank you Edson! We will slowly succeed!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 consoleSketchup.active_model.options["UnitsOptions"]["LengthFormat"]
Change unit format, paste the code in the ruby console and give me the result like that :
@unknownuser said:
Unit format (decimal, Architectural) -> result of the code
Can You do that for all SU unit Format please?
The same thing for units length... With this code :
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!
-
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.
-
Sorry !
Procedure :
For all units format (decimal, architectural, engineering, Fractional) -> NΒ°1 on the picture- Change the format in the unit SU window (NΒ°1)
- Copy, paste and excecute the code in the ruby console (NΒ°3)
Sketchup.active_model.options["UnitsOptions"]["LengthFormat"]
- 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
- Change the length in the unit SU window (NΒ°2)
- Copy, paste and excecute the code in the ruby console (NΒ°3)
Sketchup.active_model.options["UnitsOptions"]["LengthUnit"]
- 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
Sorry again, Edson!
-
gotcha! is this it?
-
Great ! The only problem is that it's the same thing as Window.... I d'ont understand your (Big) Mac Bug....
Thank you Edson! -
@edson said:
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 : [floatr:22oduved][/floatr:22oduved]
- Draw a line
- Create a dimension entity of this line
- Try to change units in the toolbar...
Is the dimension change ?
On windows, dimension changes each time you change units...
-
matt,
yes, the dimensions change. the functionality is now perfect.
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?
-
Ok cool! Thank you!
Do you have any error in the ruby console? -
no errors.
-
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
-
Hi Ken.
in the first post, a new tool has been added. The last with 11 icons.
Enjoy ! -
Hi Matt, will do some new icons soon for all eleven (didn't like the other ones)
-
Cool!
-
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
-
@unknownuser said:
I know if she gets to go, she will have a great time.
Sure!
Where will she want to go in France?
Advertisement