I’ve sometimes used UI.openURL to open a file on the local computer in its default program, and I’ve seen other extensions doing it to, e.g. a PDF manual. However it was brought to my attention last week this isn’t reliable on Mac. (Eneroth Reference Manager - #34 by john_drivenupthewall)
@john_drivenupthewall provided a good solution but it only applies to SketchUp files, not the general case.
Does this code work for e.g. opening a .layout file in LayOut?
path = UI.openpanel("Locate file")
if Sketchup.platform == :platform_win
UI.openURL(path)
else
system("open #{path.inspect}")
end