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
The results of "line.strip"
-
In the following snippet,
aFileis a text file, where a typical line may beline == " 10\n". Whenline == line.stripin order to take out the white spaces, is the resultingline == "10\n"or something else likeline == "10"?count = 0 odd_number = 1 aFile.each_line do |line| count = count +1 if count == odd_number line = line.strip odd_number = odd_number + 2 end if line == "10\n" #do something end end -
-
Tom, Thanks, I previous looked at that page, and tried to correct my code, but couldn't make it work. Guess it's another case where I am asking the wrong question. It's late, I will take another stab at it tomorrow. Except for speed, parsing, layers, block names, and nested blocks the plugin is (beta) usable.

This is a import of a Dxf file. The coding is very basic, but modular enough to add other Dxf features in the future.
Advertisement