Finding unit of drawing in options
-
Hello !
How can I find unity of the drawing in ruby ??? (mm cm inch, etc...)
Thank you !!
-
Hi,
Try this one :-def get_current_unit_(a)
case Sketchup.active_model.options[0][2]
when 0
return a.to_inch
when 1
return a.to_feet
when 2
return a.to_mm
when 3
return a.to_cm
when 4
return a.to_m
end
endOscar
-
Ok !!
I tried to find a system to allow the same thing, but I was not expecting something like this!
Thank you! It will greatly help me! -
-
Hi Mattt,
I think, I misunderstand what the title already!"a" is the value of any numeric input.
Oscar
-
I believer Matt Frenglish is trying to ask how to get the units of the drawing.
j'espere que ne te casse pas les pieds, Matt666! -
@fletch said:
I believer Matt Frenglish is trying to ask how to get the units of the drawing.
j'espere que ne te casse pas les pieds, Matt666!Then, try this
def get_current_unit ()
case Sketchup.active_model.options[0][2]
when 0
return "inch"
when 1
return "feet"
when 2
return "mm"
when 3
return "cm"
when 4
return "m"
end
end -
@fletch said:
j'espere que ne te casse pas les pieds, Matt666!
No !!
@unknownuser said:
I believer Matt Frenglish is trying to ask how to get the units of the drawing.
absolutely!
@unknownuser said:
Frenglish
@unknownuser said:
Then, try this
def get_current_unit ()
case Sketchup.active_model.options[0][2]
when 0
return "inch"
when 1
return "feet"
when 2
return "mm"
when 3
return "cm"
when 4
return "m"
end
endThank you !!
Advertisement