[Plugin] Estimates (extended)
-
-
How can I add another currencies because I don't use DOLLAR,EURO,SEK.
currencies={"Euro"=>"€","Dollar"=>"$","SEK"=>"SEK","BAHT"=>"BAHT"}
I save as to replace the attributes.rb , but it cannot be display in the sketchup. -
Hi,
Go to line 26 and add your currency to the list that appears in the dialog box:curList=["Euro","Dollar","SEK","BAHT"].join("|")
Regards,
-
how about change the unit to square meters? because in indonesia we use square meters unit, thanks in advance
-
Hi,
I don't understand the question. No foolish feet/inches unit here in France too .
The script uses the unit you set in your model and outputs areas converting internal inches to your current unit. So whatever unit you use, no problem... -
hi i have a question, the estimate cost for component always shows the "susan" word.and i can't get it to work for component costing can you help me on this. thanks.
-
Susan is the 2D figurine who is inserted into some of the templates
Now to get rid of her, delete the figurine in a new, empty file, go to Window > Model info > Statistics and Purge everything. Then save your file as a template under the file menu and set SU to make this your default template (there is a checkbox at the bottom left for it in the save as template dialog)
-
Great plugin.
How can I change the default currency that loads when I create a new Model. I have added Baht (I am in Thailand) but when I load a new model the default currency is SEK and I would like it to be Baht.Thanks
Fred -
Edit the tool's
attributes.rb
file with Notepad or a similar plain-text editor.
Find the line:
currencies={"Euro"=>"€","Dollar"=>"$","SEK"=>"SEK"}
Add [or delete]...
To add 'Baht' insert a new lash member at the end thus:
currencies={"Euro"=>"€","Dollar"=>"$","SEK"=>"SEK"**,"Baht"=>"฿"**}
Or perhaps ...**=>"B"**
depending on your PC's Unicode settings ?
Also change the line:
curList=["Euro","Dollar","SEK"].join("|")
to include it...
curList=["Euro","Dollar","SEK"**,"Baht"**].join("|")
To make that currency your default, find the line:
$estimates_currency="Euro" if !$estimates_currency
change it to...
$estimates_currency=**"Baht"** if !$estimates_currency
Hope this helps...
-
Thanks for the quick reply...
Made the changes but still Defaults to SEK...
Any other suggestions?Fred
-
I hope that you are editing the correct 'attributes.rb' file in the 'Examples' subfolder within the 'Plugins' folder... AND restarting Sketchup so the change is activated ?
Are you sure you added "Baht" in the 3 places just as I said ?There is an alternative way...
If you are always going to use "Baht" then you could set every thing to always use that.
Change the dialog part as follows to avoid asking about 'Currency':
prompts = [$exStrings.GetString("Unit: "), $exStrings.GetString("Default Material cost: ")] values = [units.index($estimates_unit), $estimates_cost_default_material]
and also the line
dropdowns=[curList,unList]
must become
dropdowns=[unList,""]
and also the line after the dialog...
Then the line
$estimates_currency=currencies[results[0]]
must become
$estimates_currency="Baht"
or
$estimates_currency="฿"
to use a 'symbol'...
The other results must also be adjusted from
$estimates_unit=units[results[1]] $estimates_cost_default_material=results[2]
to
$estimates_unit=units[results[0]] $estimates_cost_default_material=results[1]
... -
Thanks again... I have made the changes to the correct attributes file and saved it and restarted SU but it didn't change the default currency... There are two $estimates_currency="Euro" if !$estimates_currency entries one is Line 19 and again at line 374... but the one at line 374 says "SEK"...
If I change the entry at line 374, when I go to settings it shows nothing selected in the currency dropdown... The currency list is there but the default is blank...I will try the new suggestion tomorrow... I'm old and need my sleep... 2"30 am here.. Will let you know what happens...
Thanks again
Fred
-
Sorry I missed the second entry !
The script is a little muddled in its logic.As well as editing the ='Euro' line, edit the later line
def estimate_defaults() $estimates_currency="SEK" if !$estimates_currency
to read...
def estimate_defaults() $estimates_currency="Baht"
Or if you were using a 'symbol' use that instead of 'Baht'...
This will always use "Baht" as your currency ! -
%(#BF0000)["Error Loading File attributes.rb
undefined method `GetString' for nil:NilClass"]can anyone help me please?
-
Looks to me as if you haven't ticked the box for "Ruby Script Examples" in Window>Preferences>Extensions.
-
Hi Dave,
I belive I have followed every instruction, but I must have overlooked something as I can't get it to work, get this error measage:
Error Loading File C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/examples/exampleScripts.rb
undefined local variable or method' for main:ObjectError Loading File examples.rb undefined local variable or method
' for main:ObjectI have used "kr" as currency, edited the example.rb in notepad, changed as advised. Replaced the script file and restarted Sketchup several times.
Hope you can help.
Best regards
Jesper -
Did you tick the box for Ruby Script Examples under Extensions?
You changed your post while I was typing.
Do you have full administrative rights to the Plugins folder?
-
The error-message suggests that you have mis-edited the code...
Get a fresh copy and with it opened in Notepad do a case-sensitive find/replace forSEK
and substituteKr
- in every case - that's all that's needed...
If it still fail;s then can you post the line/s you edited [and the lines either side of it/them] - exactly as they appear [copy+paste] - use a 'code' formating tag...
Alternatively PM the whole file to me - don't post it all - it's confusing for members when faulty scripts are hanging around... -
@dave r said:
Did you tick the box for Ruby Script Examples under Extensions?
You changed your post while I was typing.
Do you have full administrative rights to the Plugins folder?
Hi Dave,
Yes, I did tick on the Ruby script Excamples ans yes, I have admin right to the folder and file.
Best regards
Jesper -
I think TIG has identified the problem.
Advertisement