Stand-alone app? Can it still be added to Ext Warehouse?

If one develops a non-traditional SketchUp app, like for example one that communicates between SU and Acad, can it still be included in the Extension Warehouse?

Is there a way to still integrate an rbz to start the stand-alone app, although after that operation the app is not rb file module based?

@ChrisFullmer - can you have a look at this one?

All extensions, even simple ones that would start an external utility, need to be wrapped within Ruby module namespaces. This separates extensions by authors/companies from others. Placing specific extensions within sub-module namespaces, separates various extensions from other extensions, within an author / company toplevel namespace module.

All extensions for the EW, must have a sub-folder with the same name as the extension registration Ruby script. (This holds the EW id and version text files, and any files specific to an extension, such as toolbar icons, webdialog html and/or javascript, and any other code files in whatever language (Ruby, C, etc.)

There are several ways to start an external utility, and a few more I know of on Windows.

Are you targeting cross-platform, or only Windows ?

Thanks for the help Dan, I have learned a lot from you just lurking a while here.

At this time the application will be Windows based, and for SU 2016, I have yet to drop back and test it in other versions. Of course if it does a little ROI a Mac version would be desired, but that would be in the future, and in requiring of a miracle. But that’s our mission and dream here.

I would like the application to be accessible from within SketchUp, but once it launches, at this time, it will not use rb files, but Ruby code will be used via the Ruby Console. In time certain support post-processing tools will probably be developed in typical rb extension, therefore not require the console.

Since, in one version, it ports AutoCAD drawing data, while in design with SketchUp parallel, with SketchUp as the client destination, it sort of rides on top of both in a sort of untraditional manner. Though I am sure an rb interface can do this, this is the way this app went at this time, for interface issues, buttons and such, and my lack of Ruby depth—especially that.

And I am very new to Ruby in general. This app also has a stand-alone version, with model data in “styles files”, just text file data, to drive SU 3D geometry operations. This will allow even totally SketchUp novice, or never used the program once people, to build amazing models rather quickly, yet with no “cookie cutter” type operations—and then learn from there. (SketchUp’s slogan is “3D for Everyone”, our slogan is “SketchUp for Everyone!”, lol) This is a skyscraper, building and city framework modeling tool, btw.

So I am at deployment soon level, and really want to integrate at least the basic app launch from within SketchUp as an option for greater user convenience.

But I really appreciate any insight you have so I can get this end rolling if it is possible, and learn some more Ruby techniques in the process. Thanks alot Dan and tt_su. This has been a labor of love, and I would really like to offer the application through the extension warehouse as well, it has a pretty liberal license policy, left to user discretion, but I would like to monetize the effort a little, of course, and get it into the Extension Warehouse.

Probably more than you needed to know. But thanks for your time, I really appreciate the help and insights a lot. Thanks much! Nice to have support at times like this, so close, yet so far! LOL

P.S. I am probably a month or two from deployment at this time. And can integrate this as I progress if possible.

Yeah there is nothing that I know of the would prohibit that. There are a number of rendering engines for example that combine their standalone app with a SketchUp ruby extension, and the ruby kicks off their standalone app.

Probably the main difficulty that you will run into is packaging everything you want into a simple rbz - its just a zip file. So if you can design your extension is such a way that it can be installed by simply unzipping into the plugins folder, then you should in good shape.

Also as an FYI, we do occasionally make exceptions for extensions that due to their nature can’t be packaged into a simple zip file. We have what are called “Listing Pages”. It looks just like a regular extension page, but instead of having a “Download” button, it has a link to your website, where you would distribute your installer. Again, we try hard to avoid allowing listing pages, but it could be an option if its the only thing that works in the end.

Chris Fullmer
Product Manager
SketchUp Extensibility

1 Like

The simplest (cross-platofrm) method of starting an external app, without fanfare is using the API’s UI.openURL() method.
ref API documentation: UI::openURL

external_app = "calc.exe"

This works on Windows, because the “.exe” file extension is associated, and is in a folder that appears in the ENV["PATH"] list.

You can never assume what the current working directory is, because some plugins may be lazy and not reset it after changing it. (Also SketchUp’s startup routine changed over the years and versions, and is not always the same.)

So it is usually safest to pass an absolute path to the executable.

Let’s say you installed your external application in the “Program Files” path within the “Geometry777” folder:

dir = "Geometry777"
exe = "external.exe"
path = File.join( ENV["ProgramFiles"], dir, exe )
UI.openURL( path ) if File.exist?( path )

Now, on Mac OSX the rules may be a bit different. Perhaps a “file:///” protocol prefix might be required for the path.

@slbaumgartner, can you confirm ?

Obviously, one can’t use the Windows ProgramFiles example because there is no such folder or env variable on Mac; you have to build a full path to wherever you installed the app.

Other than that, you must indeed prefix the URL with “file://” (the third slash is actually the start of the full path, i.e. the root of the filesystem). You must also include the “.app” suffix else you will get an error popup asking what application you want to use to open the file. So, for example, to open SketchUp you might use:

UI.openURL(“file:///Applications/SketchUp 2016/”)

1 Like

Thanks a lot for all the help.