💡 LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering
Download Trial
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 then
z=z.m` will work to convert it...
Advertisement