Sketchup 21.0.0 Page

Load in SketchUp: Extensions > Ruby Console > File > Open or paste code. This requires the SDK. A minimal main.cpp for a command that prints selection count:

int main() SUInitialize(); print_selection_count(); SUTerminate(); return 0; sketchup 21.0.0

# Extrude selected face by a distance (along normal) module MyTools class ExtrudeByDistance def self.extrude(face, distance) return unless face.is_a?(Sketchup::Face) Load in SketchUp: Extensions > Ruby Console >

#include <SketchUpAPI/model/defs.h> #include <SketchUpAPI/initialize.h> #include <SketchUpAPI/application/application.h> #include <SketchUpAPI/model/model.h> #include <SketchUpAPI/model/entities.h> #include <iostream> void print_selection_count() SUModelRef model = SU_INVALID; SUApplicationGetActiveModel(&model); if (!model) return; Load in SketchUp: Extensions &gt