Need some help creating new extension

I gave advice in your other topic thread.

Still not posting code correctly for the forum.

The registrar part must be in a file of it’s own in the “Plugins” folder, …
… and the SketchupExtension.new call must also pass a relative filepath to your extension’s loader file, that must be in your extension’s subfolder.
Explained in (5) of the other topic.
Example registrar file …

# encoding: UTF-8

module CaydenWilson
  module ProTrim
    EXTENSION = SketchupExtension.new(
      'ProTrim', 'CaydenWilson_ProTrim/loader'
    )
    EXTENSION.instance_eval {
      self.description='Trim builder using the FollowMe function.'
      self.version='1.0.0'
      self.copyright='Softworx 2019'
      self.creator='Softworx'
    }
    Sketchup.register_extension(EXTENSION, true)
  end
end

The “loader.rb” file would load all the other files that make up your extension.


Also all your files need to be in YOUR unique top level namespace module.
Explained in (3) of the other topic.


Also a quick websearch shows companies already using the name “SoftWorx” in the U.S., Canada, and Scotland (U.K.). Have you filed fictitious name in your state on this or is it just an example name ?

1 Like