Skip to content

Instantly share code, notes, and snippets.

@Eneroth3
Created February 7, 2022 12:20
Show Gist options
  • Save Eneroth3/3bc5f496340dadf5df62d3c2c590a488 to your computer and use it in GitHub Desktop.
Save Eneroth3/3bc5f496340dadf5df62d3c2c590a488 to your computer and use it in GitHub Desktop.
module SketchupApplicationHelper
def self.path
Sketchup.find_support_file('sketchup.exe')
end
def self.start
# Need quotation marks around path as it contains spaces.
pid = Process.spawn("\"#{path}\"")
Process.detach(pid)
end
def self.restart
start
Sketchup.quit
end
end
SketchupApplicationHelper.restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment