![]() ![]() ![]() * The proper way to get the viewer installation path is via the registry.īut, unlike all the SketchUp install there is no "InstallLocation" attribute.īut I found the path under the Windows "SharedDLLs" key: WARNING %x blocks SketchUp until the command has finished, in this example until the Viewer closes.In the example above, since the Windows command shell likes doubles quotes around path strings, I chose the square bracket delimiters, which then treats the embedded " character as any other character so the double quotes remain in the string. A %x strings does interpolation and you may choose whatever delimiter characters you like. join ( ENV, 'Documents' ), 'SketchUp Models|*.skp||' ) return unless skp_path view_skp ( skp_path ) endĪ %x executable string is an interpreter convenience that runs Kernel#` aka the global backtick method. join ( documents, skp_name ) ) def view_chosen_skp skp_path = UI. join ( ENV, 'Documents' ) skp_name = 'some_model.skp' view_skp ( File. join ( folder, 'SketchUpViewer.exe' ) # WARNING: This blocks SketchUp until Viewer is closed! %x end documents = File. join ( binary, 'SketchUp Viewer' ) viewer = File. find_support_file ( '' ) ) folder = File. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |