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!
🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
How to set length units in code
-
I want to pull a face from 0 to 4.5m, and my entities is imported from other software,how to set length units in code?
for examplepts = [] pts[0] = [edge.start.position.x, edge.start.position.y, 0] pts[1] = [edge.end.position.x, edge.end.position.y, 0] pts[2] = [edge.end.position.x, edge.end.position.y, 4.5] pts[3] = [edge.start.position.x, edge.start.position.y, 4.5]here,i want to set z value as 4.5m,how to set? thank u
-
4.5.m
Just type this in the ruby console, and see what it returns. -
If you are getting the x/y/z values as strings [perhaps from an imported text file] then
` z=z+'.m'4.5.m ### as a string
eval(z)
177.165354330709 ### in inches [SUp's base units and used to position the point]if they are as floats thenz=z.m` will work to convert it...
Advertisement