Should a button be made for an .rhp file as code is massive!

Hi,
I have a .rhp file from Pascal, the coding is HUGE.
Pascal arc through points and variations
Which command to best fit a smooth curve through a scattering of points - Rhino for Windows - McNeel Forum
CurveAndArcUtilities.rhp
I am not aware of what code goes at the start to run it from a button. and what code if any gets removed.
have only been shown such for .rvb and .py
Can it be made into a button ?

here is the code when I open the .rhp file into notepad :-

(function() {
if (‘Discourse’ in window && Discourse.container) {
Discourse.container
.lookup(“service:theme-settings”)
.registerSettings(17, {“default_thumbnail_mode”:“none”,“grid_categories”:“”,“masonry_categories”:“46|129”,“list_categories”:“”,“placeholder_icon”:“comments”,“mobile_thumbnails”:true});
}
})();
(function() {
const addRawTemplate = requirejs(‘discourse-common/lib/raw-templates’).addRawTemplate;
const template = requirejs(‘discourse-common/lib/raw-handlebars’).template({“compiler”:[8,“>= 4.3.0”],“main”:function(container,depth0,helpers,partials,data) {
var lookupProperty = container.lookupProperty || function(parent, propertyName) {
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
return parent[propertyName];
}
return undefined
};

return container.escapeExpression((lookupProperty(helpers,“raw”)||(depth0 && lookupProperty(depth0,“raw”))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),“topic-list-thumbnail”,{“name”:“raw”,“hash”:{“location”:“before-columns”,“topic”:“context.topic”},“hashTypes”:{“location”:“StringLiteral”,“topic”:“PathExpression”},“hashContexts”:{“location”:depth0,“topic”:depth0},“types”:[“StringLiteral”],“contexts”:[depth0],“data”:data,“loc”:{“start”:{“line”:1,“column”:0},“end”:{“line”:1,“column”:77}}}))
+ “\n”;
},“useData”:true});
addRawTemplate(“discourse/connectors/topic-list-before-columns/topic-thumbnail”, template);
})();

(function() {
const addRawTemplate = requirejs(‘discourse-common/lib/raw-templates’).addRawTemplate;
const template = requirejs(‘discourse-common/lib/raw-handlebars’).template({“compiler”:[8,“>= 4.3.0”],“main”:function(container,depth0,helpers,partials,data) {
var lookupProperty = container.lookupProperty || function(parent, propertyName) {
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
return parent[propertyName];
}
return undefined
};

return container.escapeExpression((lookupProperty(helpers,“raw”)||(depth0 && lookupProperty(depth0,“raw”))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),“topic-list-thumbnail”,{“name”:“raw”,“hash”:{“location”:“before-link”,“topic”:“context.topic”},“hashTypes”:{“location”:“StringLiteral”,“topic”:“PathExpression”},“hashContexts”:{“location”:depth0,“topic”:depth0},“types”:[“StringLiteral”],“contexts”:[depth0],“data”:data,“loc”:{“start”:{“line”:1,“column”:0},“end”:{“line”:1,“column”:74}}}))
+ “\n”;
},“useData”:true});
addRawTemplate(“discourse/connectors/topic-list-before-link/topic-thumbnail”, template);
})();

define(“discourse/initializers/topic-thumbnails-init”, [“exports”, “discourse/lib/plugin-api”, “@ember/service”, “@ember/object/computed”, “discourse-common/utils/decorators”, “@ember/runloop”, “discourse-common/resolver”], function (exports, _pluginApi, _service, _computed, _decorators, _runloop, _resolver) {
“use strict”;

Object.defineProperty(exports, “__esModule”, {
value: true
});

function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
var desc = {};
Object’ke’ + ‘ys’.forEach(function (key) {
desc[key] = descriptor[key];
});
desc.enumerable = !!desc.enumerable;
desc.configurable = !!desc.configurable;

if ('value' in desc || desc.initializer) {
  desc.writable = true;
}

desc = decorators.slice().reverse().reduce(function (desc, decorator) {
  return decorator(target, property, desc) || desc;
}, desc);

if (context && desc.initializer !== void 0) {
  desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
  desc.initializer = undefined;
}

if (desc.initializer === void 0) {
  Object['define' + 'Property'](target, property, desc);
  desc = null;
}

return desc;

}

var theme_name = “Topic Thumbnails”;
var settings = Discourse.container.lookup(“service:theme-settings”).getObjectForTheme(17);
var themePrefix = function themePrefix(key) {
return “theme_translations.17.” + key;
};
exports.default = {
name: “topic-thumbnails-init”,
initialize: function initialize() {
var _this = this;

  (0, _pluginApi.withPluginApi)("0.8.7", function (api) {
    return _this.initWithApi(api);
  });
},
initWithApi: function initWithApi(api) {
  var _dec, _dec2, _dec3, _dec4, _desc, _value, _obj, _dec5, _desc2, _value2, _obj2;

  api.modifyClass("component:topic-list", {
    topicThumbnailsService: (0, _service.inject)("topic-thumbnails"),
    classNameBindings: ["isThumbnailGrid:topic-thumbnails-grid", "isThumbnailList:topic-thumbnails-list", "isMasonryList:topic-thumbnails-masonry"],
    isThumbnailGrid: (0, _computed.readOnly)("topicThumbnailsService.displayGrid"),
    isThumbnailList: (0, _computed.readOnly)("topicThumbnailsService.displayList"),
    isMasonryList: (0, _computed.readOnly)("topicThumbnailsService.displayMasonry")
  });

  api.modifyClass("component:topic-list-item", {
    topicThumbnailsService: (0, _service.inject)("topic-thumbnails"),

    // Hack to disable the mobile topic-list-item template
    // Our grid styling is responsive, and uses the desktop HTML structure
    renderTopicListItem: function renderTopicListItem() {
      var wasMobileView = (0, _resolver.getResolverOption)("mobileView");
      if (wasMobileView && (this.topicThumbnailsService.displayGrid || this.topicThumbnailsService.displayMasonry)) {
        (0, _resolver.setResolverOption)("mobileView", false);
      }

      this._super();

      if (wasMobileView) {
        (0, _resolver.setResolverOption)("mobileView", true);
      }
    }
  });

  //////////////////////////
  /////////// Masonry Layout
  //////////////////////////
  api.modifyClass("component:topic-list", (_dec = (0, _decorators.default)("masonryContainerWidth"), _dec2 = (0, _decorators.default)("masonryNumColumns", "masonryContainerWidth", "masonryGridSpacingPixels"), _dec3 = (0, _decorators.observes)("topics.[]", "masonryContainerWidth"), _dec4 = (0, _decorators.default)("topicThumbnailsService.displayMasonry", "masonryNumColumns", "masonryGridSpacingPixels", "masonryTallestColumn", "masonryColumnWidth"), (_obj = {
    topicThumbnailsService: (0, _service.inject)("topic-thumbnails"),

    masonryTargetColumnWidth: 300,
    masonryGridSpacingPixels: 10,
    masonryTitleSpacePixels: 76,
    masonryDefaultAspect: 1.3,
    masonryMinAspect: 0.7,

    masonryNumColumns: function masonryNumColumns(width) {
      return Math.floor(width / this.masonryTargetColumnWidth);
    },
    masonryColumnWidth: function masonryColumnWidth(numColumns, containerWidth, gridSpacing) {
      return (containerWidth - (numColumns - 1) * gridSpacing) / numColumns;
    },
    didInsertElement: function didInsertElement() {
      var _this2 = this;

      this._super();
      if (!this.topicThumbnailsService.displayMasonry) return;
      this.updateElementHeight();

      if (window.ResizeObserver) {
        var observer = new ResizeObserver(function () {
          return _this2.updateElementHeight();
        });
        observer.observe(this.element);
        this.set("resizeObserver", observer);
      }
    },
    willDestroyElement: function willDestroyElement() {
      this._super();
      if (this.resizeObserver) {
        this.resizeObserver.unobserve(this.element);
      }
    },
    updateElementHeight: function updateElementHeight() {
      this.set("masonryContainerWidth", this.element.getBoundingClientRect().width);
    },
    masonryTopicsChanged: function masonryTopicsChanged() {
      if (!this.topicThumbnailsService.displayMasonry) return;
      if (!this.masonryContainerWidth) return;
      (0, _runloop.once)(this, this.calculateMasonryLayout);
    },
    calculateMasonryLayout: function calculateMasonryLayout() {
      var _this3 = this;

      var numColumns = this.masonryNumColumns;
      var gridSpacingPixels = this.masonryGridSpacingPixels;

      var columnHeights = [];
      for (var n = 0; n < numColumns; n++) {
        columnHeights[n] = 0;
      }

      this.filteredTopics.forEach(function (topic) {
        // Pick the column with the lowest height
        var smallestColumn = columnHeights.indexOf(Math.min.apply(Math, columnHeights));

        // Get the height of this topic
        var aspect = _this3.masonryDefaultAspect;
        if (topic.thumbnails) {
          aspect = topic.thumbnails[0].width / topic.thumbnails[0].height;
        }
        aspect = Math.max(aspect, _this3.masonryMinAspect);
        var thisHeight = _this3.masonryColumnWidth / aspect + _this3.masonryTitleSpacePixels;

        topic.set("masonryData", {
          columnIndex: smallestColumn,
          height: thisHeight,
          heightAbove: columnHeights[smallestColumn]
        });

        columnHeights[smallestColumn] += thisHeight + gridSpacingPixels;
      });

      this.set("masonryTallestColumn", Math.max.apply(Math, columnHeights));
    },


    attributeBindings: ["masonryStyle:style"],

    masonryStyle: function masonryStyle(useMasonry, numColumns, gridSpacingPixels, tallestColumn, columnWidth) {
      if (!useMasonry) return;

      return ("--masonry-num-columns: " + Math.round(numColumns) + "; " + ("--masonry-grid-spacing: " + gridSpacingPixels + "px; ") + ("--masonry-tallest-column: " + Math.round(tallestColumn) + "px; ") + ("--masonry-column-width: " + Math.round(columnWidth) + "px; ")).htmlSafe();
    }
  }, (_applyDecoratedDescriptor(_obj, "masonryNumColumns", [_dec], Object.getOwnPropertyDescriptor(_obj, "masonryNumColumns"), _obj), _applyDecoratedDescriptor(_obj, "masonryColumnWidth", [_dec2], Object.getOwnPropertyDescriptor(_obj, "masonryColumnWidth"), _obj), _applyDecoratedDescriptor(_obj, "masonryTopicsChanged", [_dec3], Object.getOwnPropertyDescriptor(_obj, "masonryTopicsChanged"), _obj), _applyDecoratedDescriptor(_obj, "masonryStyle", [_dec4], Object.getOwnPropertyDescriptor(_obj, "masonryStyle"), _obj)), _obj)));

  api.modifyClass("component:topic-list-item", (_dec5 = (0, _decorators.default)("topic.masonryData"), (_obj2 = {
    attributeBindings: ["masonryStyle:style"],

    masonryStyle: function masonryStyle(masonryData) {
      if (!masonryData) return;

      return ("--masonry-height: " + Math.round(masonryData.height) + "px; " + ("--masonry-height-above: " + Math.round(masonryData.heightAbove) + "px; ") + ("--masonry-column-index: " + masonryData.columnIndex + ";")).htmlSafe();
    }
  }, (_applyDecoratedDescriptor(_obj2, "masonryStyle", [_dec5], Object.getOwnPropertyDescriptor(_obj2, "masonryStyle"), _obj2)), _obj2)));
}

};
});
define(“discourse/raw-views/topic-list-thumbnail”, [“exports”, “discourse-common/utils/decorators”, “@ember/object”, “@ember/service”, “@ember/object/computed”], function (exports, _decorators, _object, _service, _computed) {
“use strict”;

Object.defineProperty(exports, “__esModule”, {
value: true
});

function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
var desc = {};
Object’ke’ + ‘ys’.forEach(function (key) {
desc[key] = descriptor[key];
});
desc.enumerable = !!desc.enumerable;
desc.configurable = !!desc.configurable;

if ('value' in desc || desc.initializer) {
  desc.writable = true;
}

desc = decorators.slice().reverse().reduce(function (desc, decorator) {
  return decorator(target, property, desc) || desc;
}, desc);

if (context && desc.initializer !== void 0) {
  desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
  desc.initializer = undefined;
}

if (desc.initializer === void 0) {
  Object['define' + 'Property'](target, property, desc);
  desc = null;
}

return desc;

}

var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _desc, _value, _obj;

var theme_name = “Topic Thumbnails”;
var settings = Discourse.container.lookup(“service:theme-settings”).getObjectForTheme(17);
var themePrefix = function themePrefix(key) {
return “theme_translations.17.” + key;
};
exports.default = _object.default.extend((_dec = (0, _decorators.default)(“topicThumbnailsService.displayList”), _dec2 = (0, _decorators.default)(“location”, “site.mobileView”, “topicThumbnailsService.displayGrid”, “topicThumbnailsService.displayList”, “topicThumbnailsService.displayMasonry”), _dec3 = (0, _decorators.default)(“topic.thumbnails”), _dec4 = (0, _decorators.default)(“topic.thumbnails”, “displayWidth”), _dec5 = (0, _decorators.default)(“topic.thumbnails”), _dec6 = (0, _decorators.default)(“original”), _dec7 = (0, _decorators.default)(“original”), _dec8 = (0, _decorators.default)(“topic.thumbnails”), _dec9 = (0, _decorators.default)(“topic”), (_obj = {
topicThumbnailsService: (0, _service.inject)(“topic-thumbnails”),

shouldDisplay: (0, _computed.and)("topicThumbnailsService.shouldDisplay", "enabledForOutlet"),

displayWidth: function displayWidth(displayList) {
  return displayList ? 200 : 400;
},


responsiveRatios: [1, 1.5, 2],

enabledForOutlet: function enabledForOutlet(location, mobile, displayGrid, displayList, displayMasonry) {
  if ((displayGrid || displayMasonry) && location === "before-columns") return true;
  if (displayList && location === "before-link") return true;
  return false;
},
hasThumbnail: function hasThumbnail(thumbnails) {
  return !!thumbnails;
},
srcSet: function srcSet(thumbnails, displayWidth) {
  var srcSetArray = [];

  this.responsiveRatios.forEach(function (ratio) {
    var target = ratio * displayWidth;
    var match = thumbnails.find(function (t) {
      return t.url && t.max_width === target;
    });
    if (match) {
      srcSetArray.push(match.url + " " + ratio + "x");
    }
  });

  if (srcSetArray.length === 0) {
    srcSetArray.push(this.original.url + " 1x");
  }

  return srcSetArray.join(",");
},
original: function original(thumbnails) {
  return thumbnails[0];
},
width: function width(original) {
  return original.width;
},
height: function height(original) {
  return original.height;
},
fallbackSrc: function fallbackSrc(thumbnails) {
  var _this = this;

  var largeEnough = thumbnails.filter(function (t) {
    if (!t.url) return false;
    return t.max_width > _this.displayWidth * _this.responsiveRatios.lastObject;
  });

  if (largeEnough.lastObject) {
    return largeEnough.lastObject.url;
  }

  return this.original.url;
},
url: function url(topic) {
  return topic.linked_post_number ? topic.urlForPostNumber(topic.linked_post_number) : topic.get("lastUnreadUrl");
}

}, (_applyDecoratedDescriptor(_obj, “displayWidth”, [_dec], Object.getOwnPropertyDescriptor(_obj, “displayWidth”), _obj), _applyDecoratedDescriptor(_obj, “enabledForOutlet”, [_dec2], Object.getOwnPropertyDescriptor(_obj, “enabledForOutlet”), _obj), _applyDecoratedDescriptor(_obj, “hasThumbnail”, [_dec3], Object.getOwnPropertyDescriptor(_obj, “hasThumbnail”), _obj), _applyDecoratedDescriptor(_obj, “srcSet”, [_dec4], Object.getOwnPropertyDescriptor(_obj, “srcSet”), _obj), _applyDecoratedDescriptor(_obj, “original”, [_dec5], Object.getOwnPropertyDescriptor(_obj, “original”), _obj), _applyDecoratedDescriptor(_obj, “width”, [_dec6], Object.getOwnPropertyDescriptor(_obj, “width”), _obj), _applyDecoratedDescriptor(_obj, “height”, [_dec7], Object.getOwnPropertyDescriptor(_obj, “height”), _obj), _applyDecoratedDescriptor(_obj, “fallbackSrc”, [_dec8], Object.getOwnPropertyDescriptor(_obj, “fallbackSrc”), _obj), _applyDecoratedDescriptor(_obj, “url”, [_dec9], Object.getOwnPropertyDescriptor(_obj, “url”), _obj)), _obj)));
});
define(“discourse/services/topic-thumbnails”, [“exports”, “@ember/service”, “discourse-common/utils/decorators”, “discourse/models/site”], function (exports, _service, _decorators, _site) {
“use strict”;

Object.defineProperty(exports, “__esModule”, {
value: true
});

function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
var desc = {};
Object’ke’ + ‘ys’.forEach(function (key) {
desc[key] = descriptor[key];
});
desc.enumerable = !!desc.enumerable;
desc.configurable = !!desc.configurable;

if ('value' in desc || desc.initializer) {
  desc.writable = true;
}

desc = decorators.slice().reverse().reduce(function (desc, decorator) {
  return decorator(target, property, desc) || desc;
}, desc);

if (context && desc.initializer !== void 0) {
  desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
  desc.initializer = undefined;
}

if (desc.initializer === void 0) {
  Object['define' + 'Property'](target, property, desc);
  desc = null;
}

return desc;

}

var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _desc, _value, _obj;

var theme_name = “Topic Thumbnails”;
var settings = Discourse.container.lookup(“service:theme-settings”).getObjectForTheme(17);
var themePrefix = function themePrefix(key) {
return “theme_translations.17.” + key;
};

var listCategories = settings.list_categories.split(“|”).map(function (id) {
return parseInt(id, 10);
});

var gridCategories = settings.grid_categories.split(“|”).map(function (id) {
return parseInt(id, 10);
});

var masonryCategories = settings.masonry_categories.split(“|”).map(function (id) {
return parseInt(id, 10);
});

exports.default = _service.default.extend((_dec = (0, _decorators.default)(“router.currentRouteName”, “router.currentRoute.attributes.category.id”), _dec2 = (0, _decorators.default)(“viewingCategoryId”, “router.currentRoute.metadata.customThumbnailMode”), _dec3 = (0, _decorators.default)(“displayMode”), _dec4 = (0, _decorators.default)(), _dec5 = (0, _decorators.default)(“enabledForRoute”, “enabledForDevice”), _dec6 = (0, _decorators.default)(“shouldDisplay”, “displayMode”), _dec7 = (0, _decorators.default)(“shouldDisplay”, “displayMode”), _dec8 = (0, _decorators.default)(“shouldDisplay”, “displayMode”), (_obj = {
router: (0, _service.inject)(“router”),

viewingCategoryId: function viewingCategoryId(currentRouteName, categoryId) {
  if (!currentRouteName.match(/^discovery\./)) return;
  return categoryId;
},
displayMode: function displayMode(viewingCategoryId, customThumbnailMode) {
  if (customThumbnailMode) return customThumbnailMode;

  if (masonryCategories.includes(viewingCategoryId)) {
    return "masonry";
  } else if (gridCategories.includes(viewingCategoryId)) {
    return "grid";
  } else if (listCategories.includes(viewingCategoryId)) {
    return "list";
  } else {
    return settings.default_thumbnail_mode;
  }
},
enabledForRoute: function enabledForRoute(displayMode) {
  return displayMode !== "none";
},
enabledForDevice: function enabledForDevice() {
  return _site.default.current().mobileView ? settings.mobile_thumbnails : true;
},
shouldDisplay: function shouldDisplay(enabledForRoute, enabledForDevice) {
  return enabledForRoute && enabledForDevice;
},
displayList: function displayList(shouldDisplay, displayMode) {
  return shouldDisplay && displayMode === "list";
},
displayGrid: function displayGrid(shouldDisplay, displayMode) {
  return shouldDisplay && displayMode === "grid";
},
displayMasonry: function displayMasonry(shouldDisplay, displayMode) {
  return shouldDisplay && displayMode === "masonry";
}

}, (_applyDecoratedDescriptor(_obj, “viewingCategoryId”, [_dec], Object.getOwnPropertyDescriptor(_obj, “viewingCategoryId”), _obj), _applyDecoratedDescriptor(_obj, “displayMode”, [_dec2], Object.getOwnPropertyDescriptor(_obj, “displayMode”), _obj), _applyDecoratedDescriptor(_obj, “enabledForRoute”, [_dec3], Object.getOwnPropertyDescriptor(_obj, “enabledForRoute”), _obj), _applyDecoratedDescriptor(_obj, “enabledForDevice”, [_dec4], Object.getOwnPropertyDescriptor(_obj, “enabledForDevice”), _obj), _applyDecoratedDescriptor(_obj, “shouldDisplay”, [_dec5], Object.getOwnPropertyDescriptor(_obj, “shouldDisplay”), _obj), _applyDecoratedDescriptor(_obj, “displayList”, [_dec6], Object.getOwnPropertyDescriptor(_obj, “displayList”), _obj), _applyDecoratedDescriptor(_obj, “displayGrid”, [_dec7], Object.getOwnPropertyDescriptor(_obj, “displayGrid”), _obj), _applyDecoratedDescriptor(_obj, “displayMasonry”, [_dec8], Object.getOwnPropertyDescriptor(_obj, “displayMasonry”), _obj)), _obj)));
});
(function() {
const addRawTemplate = requirejs(‘discourse-common/lib/raw-templates’).addRawTemplate;
const template = requirejs(‘discourse-common/lib/raw-handlebars’).template({“1”:function(container,depth0,helpers,partials,data) {
var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
return parent[propertyName];
}
return undefined
};

return " <div class="topic-list-thumbnail">\n <a href=""
+ container.escapeExpression(lookupProperty(helpers,“get”).call(depth0 != null ? depth0 : (container.nullContext || {}),“view.url”,{“name”:“get”,“hash”:{},“hashTypes”:{},“hashContexts”:{},“types”:[“PathExpression”],“contexts”:[depth0],“data”:data,“loc”:{“start”:{“line”:3,“column”:13},“end”:{“line”:3,“column”:25}}}))
+ “">\n”
+ ((stack1 = lookupProperty(helpers,“if”).call(depth0 != null ? depth0 : (container.nullContext || {}),“view.hasThumbnail”,{“name”:“if”,“hash”:{},“hashTypes”:{},“hashContexts”:{},“fn”:container.program(2, data, 0),“inverse”:container.program(4, data, 0),“types”:[“PathExpression”],“contexts”:[depth0],“data”:data,“loc”:{“start”:{“line”:4,“column”:6},“end”:{“line”:23,“column”:13}}})) != null ? stack1 : “”)
+ " \n \n";
},“2”:function(container,depth0,helpers,partials,data) {
var lookupProperty = container.lookupProperty || function(parent, propertyName) {
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
return parent[propertyName];
}
return undefined
};

return " <img class="background-thumbnail" \n src=""
+ container.escapeExpression(lookupProperty(helpers,“get”).call(depth0 != null ? depth0 : (container.nullContext || {}),“view.fallbackSrc”,{“name”:“get”,“hash”:{},“hashTypes”:{},“hashContexts”:{},“types”:[“PathExpression”],“contexts”:[depth0],“data”:data,“loc”:{“start”:{“line”:6,“column”:19},“end”:{“line”:6,“column”:39}}}))
+ “" \n srcset="”
+ container.escapeExpression(lookupProperty(helpers,“get”).call(depth0 != null ? depth0 : (container.nullContext || {}),“view.srcSet”,{“name”:“get”,“hash”:{},“hashTypes”:{},“hashContexts”:{},“types”:[“PathExpression”],“contexts”:[depth0],“data”:data,“loc”:{“start”:{“line”:7,“column”:22},“end”:{“line”:7,“column”:37}}}))
+ “" \n width=”
+ container.escapeExpression(lookupProperty(helpers,“get”).call(depth0 != null ? depth0 : (container.nullContext || {}),“view.width”,{“name”:“get”,“hash”:{},“hashTypes”:{},“hashContexts”:{},“types”:[“PathExpression”],“contexts”:[depth0],“data”:data,“loc”:{“start”:{“line”:8,“column”:20},“end”:{“line”:8,“column”:34}}}))
+ " \n height="
+ container.escapeExpression(lookupProperty(helpers,“get”).call(depth0 != null ? depth0 : (container.nullContext || {}),“view.height”,{“name”:“get”,“hash”:{},“hashTypes”:{},“hashContexts”:{},“types”:[“PathExpression”],“contexts”:[depth0],“data”:data,“loc”:{“start”:{“line”:9,“column”:21},“end”:{“line”:9,“column”:36}}}))
+ " \n loading="lazy"\n />\n <img class="main-thumbnail" \n src=""
+ container.escapeExpression(lookupProperty(helpers,“get”).call(depth0 != null ? depth0 : (container.nullContext || {}),“view.fallbackSrc”,{“name”:“get”,“hash”:{},“hashTypes”:{},“hashContexts”:{},“types”:[“PathExpression”],“contexts”:[depth0],“data”:data,“loc”:{“start”:{“line”:13,“column”:19},“end”:{“line”:13,“column”:39}}}))
+ “" \n srcset="”
+ container.escapeExpression(lookupProperty(helpers,“get”).call(depth0 != null ? depth0 : (container.nullContext || {}),“view.srcSet”,{“name”:“get”,“hash”:{},“hashTypes”:{},“hashContexts”:{},“types”:[“PathExpression”],“contexts”:[depth0],“data”:data,“loc”:{“start”:{“line”:14,“column”:22},“end”:{“line”:14,“column”:37}}}))
+ “" \n width=”
+ container.escapeExpression(lookupProperty(helpers,“get”).call(depth0 != null ? depth0 : (container.nullContext || {}),“view.width”,{“name”:“get”,“hash”:{},“hashTypes”:{},“hashContexts”:{},“types”:[“PathExpression”],“contexts”:[depth0],“data”:data,“loc”:{“start”:{“line”:15,“column”:20},“end”:{“line”:15,“column”:34}}}))
+ " \n height="
+ container.escapeExpression(lookupProperty(helpers,“get”).call(depth0 != null ? depth0 : (container.nullContext || {}),“view.height”,{“name”:“get”,“hash”:{},“hashTypes”:{},“hashContexts”:{},“types”:[“PathExpression”],“contexts”:[depth0],“data”:data,“loc”:{“start”:{“line”:16,“column”:21},“end”:{“line”:16,“column”:36}}}))
+ " \n loading="lazy"\n />\n";
},“4”:function(container,depth0,helpers,partials,data) {
var lookupProperty = container.lookupProperty || function(parent, propertyName) {
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
return parent[propertyName];
}
return undefined
};

return " <div class="thumbnail-placeholder">\n "
+ container.escapeExpression((lookupProperty(helpers,“d-icon”)||(depth0 && lookupProperty(depth0,“d-icon”))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),(lookupProperty(helpers,“theme-setting”)||(depth0 && lookupProperty(depth0,“theme-setting”))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),17,“placeholder_icon”,{“name”:“theme-setting”,“hash”:{},“hashTypes”:{},“hashContexts”:{},“types”:[“NumberLiteral”,“StringLiteral”],“contexts”:[depth0,depth0],“data”:data,“loc”:{“start”:{“line”:21,“column”:19},“end”:{“line”:21,“column”:53}}}),{“name”:“d-icon”,“hash”:{},“hashTypes”:{},“hashContexts”:{},“types”:[“SubExpression”],“contexts”:[depth0],“data”:data,“loc”:{“start”:{“line”:21,“column”:10},“end”:{“line”:21,“column”:55}}}))
+ “\n \n”;
},“compiler”:[8,“>= 4.3.0”],“main”:function(container,depth0,helpers,partials,data) {
var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
return parent[propertyName];
}
return undefined
};

return ((stack1 = lookupProperty(helpers,“if”).call(depth0 != null ? depth0 : (container.nullContext || {}),“view.shouldDisplay”,{“name”:“if”,“hash”:{},“hashTypes”:{},“hashContexts”:{},“fn”:container.program(1, data, 0),“inverse”:container.noop,“types”:[“PathExpression”],“contexts”:[depth0],“data”:data,“loc”:{“start”:{“line”:1,“column”:0},“end”:{“line”:26,“column”:7}}})) != null ? stack1 : “”);
},“useData”:true});
addRawTemplate(“topic-list-thumbnail”, template);
})();

Steve

Hello - I am not sure posting the entire code for a plug-in is a great way to get help about the commands it has - can you please delete all of that, and start over, what is the real question?

-Pascal

2 Likes

How to turn it into the code for a button, so by not posting the code I expected to be asked to post it.

so I shall delete it ,after you see my reply and reply, but then how does anyone see it and advise on what to do with it regards make it a button code ?

Steve

The plug-in has commands - you can treat these as any other commands. Load the plug-in by drag and drop onto Rhino.

-Pascal

Hi,
I am being told to best put scripts in buttons so I am making buttons for all my .rvb and .py codes and this one would also be great as a button. I am being told that stored and referenced if the store gets moved things wont work.
Also as a button its a visual aide memoire, else one has to remember the function name to initiate it.
@Helvetosaur
However the vastness and mix there when I opened that in notepad has me baffled, its almost as if its a thread in a file ! and I dont know what to prefix it with as there are different starter codes for .rvb and .py.

Is all that just one solid code ?
What would that be for a button ?

Steve

I am not sure what you mean here - you cannot put a plug-in on a button. You can but the various commands that are in the plug-in on buttons. Treat the plug-in as a source for commands - treat the commands as you would any other. The ciommands in this plug-in are

3PtArcFromPoints
3PtArcFromPolyline
ArcFitToCurve
ArcFitToPoints
ArcFitToPolyline
DimCurveAngle
RadiusFrom3Pts
SelArc
SelArcByRadius
SelArcRange
SelCircle
SelCircleByRadius
SetArcDegrees
SetArcRadians
SetCurveLength
SubCrvFromMid

-Pascal

Hi,
I had as the file name arcThroughPoints so thought it was a command with a few options within,
yes clearly if it has a bunch of commands thats not for button making !
I will drag and drop that to an open V7 then.

Cheers
Steve