Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
New plugin to extrude multiple selected surfaces at once using your custom value
-
New plugin to extrude multiple selected surfaces at once using your custom value

-
Please reorganize your extension as a TRUE SketchUp extension.
See: https://ruby.sketchup.com/file.extension_requirements.htmlAlso, take note of the various numeric conversion methods that the SketchUp API has added to the Numeric class. (You do not need to write your own conversion formulae.) Here is an example that will default to model units, if the
unitargument is blank:def convert_to_inches(value, unit = nil) units = Sketchup.active_model.options["UnitsOptions"] if unit.nil? # use model units case units["LengthFormat"] when Length::Architectural, Length::Fractional return value.inch when Length::Engineering return value.feet else # Length::Decimal unit = units["LengthUnit"] end end case unit when :in, Length::Inches then value.inch when :m, Length::Meter then value.m when :cm, Length::Centimeter then value.cm when :mm, Length::Millimeter then value.mm when :ft, Length::Feet then value.feet when :yd, 5 # NOTE: constant Length::Yard (5) was added for SU2020, # use 5 to avoid NameError exception in older versions. value.yard # yards to inches else value.inch # if inches or unknown end endAlso, this is a good read for dealing with units in SketchUp:
https://www.thomthom.net/thoughts/2012/08/dealing-with-units-in-sketchup/
Advertisement