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!
🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
How to retrieve the version of the model
-
is there a way using ruby?
i found the code to retrieve the version of sketchupsketchup_v = Sketchup.version_number.to_s
but i don't see anything to do the same for the model itself
-
You need to read in the first part of the binary file SKP and see what version it says...
SketchUp Model{17.0.18899}䖯挢べ仪躯蘚䆤寸ÿ...In Ruby try something like this:
vv=File.open(skp_path, 'rb'){|f| f.read }.unpack('m*').pack('m').gsub(/SketchUpModel/,'').to_i.to_s;if vv[0].chr=='1';v=vv[0].chr+vv[1].chr;else;v=vv[0].chr;endskp_pathis the full path to the SKP you are trying to find the version of.
vvis the long version number, as a string [e.g."17018899"]
vis the short version number, as a string [e.g."17"]
If you want more details parsevvdifferently...
Advertisement