SketchUcation Plugin Store

 

 

[Plugin] Toggle Units v2.11 (20110915)

Re: [Plugin] Toggle Units

Postby Matt666 » Thu Jul 31, 2008 1:11 pm

Can you try with this script, please ?
Please, register (free) to access all the attachments on the forums.
Frenglish at its best !
My scripts
Matt666
 
Posts: 829
Joined: Wed Dec 05, 2007 8:38 am
Location: 48.1184, -1.675
Name: Matt

Re: [Plugin] Toggle Units

Postby Vichingo » Thu Jul 31, 2008 1:35 pm

Hi,

I am having some difficulties with the qua;ity of the Icons. For some reason they will not clean up, and they look very distored. Anybody want to desing some slick buttons to dress up this otherwise great plug
Vichingo
 
Posts: 1
Joined: Wed Jul 30, 2008 8:26 am

Re: [Plugin] Toggle Units

Postby Edson » Thu Jul 31, 2008 1:47 pm

sure. no changes, ie, nothing happened. i have attached a screen grab for you to see that the error message is still showing and the toolbar shows a blank square (it does not change if i click on it).

should you need me to test future changes on mac, just let me know.
toggleunits.png
Please, register (free) to access all the attachments on the forums.
edson mahfuz, architect
http://www.mahfuz.arq.br

Anyone can get you more for more, but it takes genius to get you more for less.
User avatar
Edson
Global Moderator
 
Posts: 2663
Joined: Mon Oct 22, 2007 1:46 pm
Location: Porto Alegre, Brasil
Name: Edson Mahfuz
Operating system: Mac
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Toggle Units

Postby CadFather » Thu Jul 31, 2008 2:10 pm

..phew - didn't know i was going to give you so much work Matt!

i can draw some icons later today - can i suggest one further change to the scripts: if we have the icons in png formats they are much better quality..Thanks
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 839
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: CadFather

Re: [Plugin] Toggle Units

Postby Matt666 » Thu Jul 31, 2008 4:28 pm

No problem CadFather ;)

Edson : Thank you !
Have you unzipped ain the plugin folder, and keep icons in the folder "toggle_units_icons" ?
If yes, Can you open ruby console, type this line please :
Code: Select all
Sketchup.find_support_file("tuin.gif", "Plugins/toggle_units_icons")

and show me what it returns ?

Thank you !
Frenglish at its best !
My scripts
Matt666
 
Posts: 829
Joined: Wed Dec 05, 2007 8:38 am
Location: 48.1184, -1.675
Name: Matt

Re: [Plugin] Toggle Units

Postby Edson » Thu Jul 31, 2008 5:26 pm

it returns this:
> Sketchup.find_support_file("tuin.gif", "Plugins/toggle_units_icons")
/Library/Application Support/Google SketchUp 6/SketchUp/Plugins/toggle_units_icons/tuin.gif


cheers.
edson mahfuz, architect
http://www.mahfuz.arq.br

Anyone can get you more for more, but it takes genius to get you more for less.
User avatar
Edson
Global Moderator
 
Posts: 2663
Joined: Mon Oct 22, 2007 1:46 pm
Location: Porto Alegre, Brasil
Name: Edson Mahfuz
Operating system: Mac
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Toggle Units

Postby CadFather » Fri Aug 01, 2008 12:59 am

some icons - not great, will work more..

tu.png
Please, register (free) to access all the attachments on the forums.
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 839
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: CadFather

Re: [Plugin] Toggle Units

Postby Cornel » Fri Aug 01, 2008 1:52 pm

Many thanks, Matt!
For me it’s a considerable tool – I work very often w/ different unit formats on the same dwgs.

Best regards,
Cornel
Cornel
 
Posts: 461
Joined: Thu May 15, 2008 4:41 pm

Re: [Plugin] Toggle Units

Postby Didier Bur » Fri Aug 01, 2008 8:24 pm

Matt,
STP remplace "unity" par "unit" dans le script. Unity veut dire à peu près "unification". ;)
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur
 
Posts: 1239
Joined: Wed Nov 14, 2007 10:07 pm
Location: Nancy, France
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Toggle Units

Postby Matt666 » Fri Aug 01, 2008 8:26 pm

@CadFather, Thank you ! Could you post them in png format, please ?

Didier wrote:STP remplace "unity" par "unit" dans le script. Unity veut dire à peu près "unification".

:oops: :roflmao: Vive mon anglais désastreux !

You're welcome Cornel !! ;)
Frenglish at its best !
My scripts
Matt666
 
Posts: 829
Joined: Wed Dec 05, 2007 8:38 am
Location: 48.1184, -1.675
Name: Matt

Re: [Plugin] Toggle Units

Postby CadFather » Fri Aug 01, 2008 9:23 pm

..they do need touching up, but here they are
Please, register (free) to access all the attachments on the forums.
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 839
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: CadFather

Re: [Plugin] Toggle Units

Postby Matt666 » Sat Aug 02, 2008 4:34 pm

The 9 icons script has been updated with new icons on the script post. Please try it Edson !

Thank you CadFather !!
Frenglish at its best !
My scripts
Matt666
 
Posts: 829
Joined: Wed Dec 05, 2007 8:38 am
Location: 48.1184, -1.675
Name: Matt

Re: [Plugin] Toggle Units

Postby Edson » Sun Aug 03, 2008 2:38 am

Matt666 wrote:The 9 icons script has been updated with new icons on the script post. Please try it Edson !


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.
edson mahfuz, architect
http://www.mahfuz.arq.br

Anyone can get you more for more, but it takes genius to get you more for less.
User avatar
Edson
Global Moderator
 
Posts: 2663
Joined: Mon Oct 22, 2007 1:46 pm
Location: Porto Alegre, Brasil
Name: Edson Mahfuz
Operating system: Mac
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Toggle Units

Postby Matt666 » Sun Aug 03, 2008 1:11 pm

Aaaargh ! I don't understand :o :o :o :( :(

I need some help... I will ask others french scripters ;) ! THERE IS A SOLUTION !!
Frenglish at its best !
My scripts
Matt666
 
Posts: 829
Joined: Wed Dec 05, 2007 8:38 am
Location: 48.1184, -1.675
Name: Matt

Re: [Plugin] Toggle Units

Postby CadFather » Sun Aug 03, 2008 1:29 pm

anyone else on mac having the same problem?
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 839
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: CadFather

Re: [Plugin] Toggle Units

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

very good!thanks. :sketchstatic:
jiegou
 
Posts: 2
Joined: Mon Dec 24, 2007 4:39 am

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!
Please, register (free) to access all the attachments on the forums.
Last edited by Matt666 on Thu Dec 11, 2008 4:26 pm, edited 1 time in total.
Frenglish at its best !
My scripts
Matt666
 
Posts: 829
Joined: Wed Dec 05, 2007 8:38 am
Location: 48.1184, -1.675
Name: Matt

Re: [Plugin] Toggle Units

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

Can someone test this last one on Mac, please ?
Frenglish at its best !
My scripts
Matt666
 
Posts: 829
Joined: Wed Dec 05, 2007 8:38 am
Location: 48.1184, -1.675
Name: Matt

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.
Please, register (free) to access all the attachments on the forums.
edson mahfuz, architect
http://www.mahfuz.arq.br

Anyone can get you more for more, but it takes genius to get you more for less.
User avatar
Edson
Global Moderator
 
Posts: 2663
Joined: Mon Oct 22, 2007 1:46 pm
Location: Porto Alegre, Brasil
Name: Edson Mahfuz
Operating system: Mac
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

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) ;)
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 839
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: CadFather

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
Frenglish at its best !
My scripts
Matt666
 
Posts: 829
Joined: Wed Dec 05, 2007 8:38 am
Location: 48.1184, -1.675
Name: Matt

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.
edson mahfuz, architect
http://www.mahfuz.arq.br

Anyone can get you more for more, but it takes genius to get you more for less.
User avatar
Edson
Global Moderator
 
Posts: 2663
Joined: Mon Oct 22, 2007 1:46 pm
Location: Porto Alegre, Brasil
Name: Edson Mahfuz
Operating system: Mac
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

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!
Frenglish at its best !
My scripts
Matt666
 
Posts: 829
Joined: Wed Dec 05, 2007 8:38 am
Location: 48.1184, -1.675
Name: Matt

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.
Please, register (free) to access all the attachments on the forums.
edson mahfuz, architect
http://www.mahfuz.arq.br

Anyone can get you more for more, but it takes genius to get you more for less.
User avatar
Edson
Global Moderator
 
Posts: 2663
Joined: Mon Oct 22, 2007 1:46 pm
Location: Porto Alegre, Brasil
Name: Edson Mahfuz
Operating system: Mac
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

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 !
Frenglish at its best !
My scripts
Matt666
 
Posts: 829
Joined: Wed Dec 05, 2007 8:38 am
Location: 48.1184, -1.675
Name: Matt

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!
Frenglish at its best !
My scripts
Matt666
 
Posts: 829
Joined: Wed Dec 05, 2007 8:38 am
Location: 48.1184, -1.675
Name: Matt

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.
Please, register (free) to access all the attachments on the forums.
edson mahfuz, architect
http://www.mahfuz.arq.br

Anyone can get you more for more, but it takes genius to get you more for less.
User avatar
Edson
Global Moderator
 
Posts: 2663
Joined: Mon Oct 22, 2007 1:46 pm
Location: Porto Alegre, Brasil
Name: Edson Mahfuz
Operating system: Mac
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

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!
Frenglish at its best !
My scripts
Matt666
 
Posts: 829
Joined: Wed Dec 05, 2007 8:38 am
Location: 48.1184, -1.675
Name: Matt

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.
edson mahfuz, architect
http://www.mahfuz.arq.br

Anyone can get you more for more, but it takes genius to get you more for less.
User avatar
Edson
Global Moderator
 
Posts: 2663
Joined: Mon Oct 22, 2007 1:46 pm
Location: Porto Alegre, Brasil
Name: Edson Mahfuz
Operating system: Mac
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

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!
Please, register (free) to access all the attachments on the forums.
Frenglish at its best !
My scripts
Matt666
 
Posts: 829
Joined: Wed Dec 05, 2007 8:38 am
Location: 48.1184, -1.675
Name: Matt

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Vertex Tools for SketchUp. Take control over each vertex with this vertex editor for SketchUp.

Premium Members get 20% discount!

Ad Machine
Robot
 
Posts: 2012

Next

Return to Plugins

Who is online

Users browsing this forum: Google Bot, Google Feedfetcher, pbun, TMLEE, try2jk, yabon and 4 guests