Created
February 7, 2022 12:20
-
-
Save Eneroth3/3bc5f496340dadf5df62d3c2c590a488 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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