Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
[Code] Sketchup.send_action() : Arguments to
-
@dan rathbun said:
Has anyone found a cross-platform string to send the model to Layout ?
On the PC only this works:
Sketchup::send_action( 23051 )John confirmed that
Sketchup::send_action("sendToLayOut:")works on Mac.So that gives us a cross-platform method
<span class="syntaxdefault">def send_active_model_to_layout</span><span class="syntaxkeyword">()<br /></span><span class="syntaxdefault"> return nil unless Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">is_pro</span><span class="syntaxkeyword">?<br /></span><span class="syntaxdefault"> if </span><span class="syntaxkeyword">(</span><span class="syntaxdefault">Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">respond_to</span><span class="syntaxkeyword">?(;</span><span class="syntaxdefault">platform</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">&&<br /></span><span class="syntaxdefault"> Sketchup</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">platform </span><span class="syntaxkeyword">==</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">;</span><span class="syntaxdefault">platform_win </span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">||<br /></span><span class="syntaxdefault"> RUBY_PLATFORM </span><span class="syntaxkeyword">!~</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">/(</span><span class="syntaxdefault">darwin</span><span class="syntaxkeyword">)/</span><span class="syntaxdefault">i<br /> Sketchup</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">send_action</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> 23051 </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault"> else<br /> Sketchup</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">send_action</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"sendToLayOut;"</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault"> end<br />end<br /></span>EDIT: inserted Pro only bailout statement to return
nilif not SketchUp Pro.
-
it's been a while and maybe everyone has lost interest, but I found a few more for the mac list...
the big question is, how many of these run on a PC?
single # denotes a Menu Title, ## Item Title, ### hard coded shortcut combo...
# SketchUp Sketchup.send_action('showAboutBox;') ## About SketchUp Sketchup.send_action('showSketchUpPreferences;') ## Preferences... Sketchup.send_action('manageLicenses;') ## License... Sketchup.send_action('checkWebUpdate;') ## Check Web for Update... Sketchup.send_action('hide;') ## Hide SketchUp ### ⌘H Sketchup.send_action('hideOtherApplications;') ## Hide Others ### ⌘H Sketchup.send_action('unhideAllApplications;') ## Show All Sketchup.send_action('terminate;') ## Quit SketchUp ### ⌘Q # File Sketchup.send_action('newDocument;') ## New ### ⌘N Sketchup.send_action('openDocument;') ## Open... ### ⌘O Sketchup.send_action('clearRecentDocuments;') ## Clear Menu Sketchup.send_action('performClose;') ## Close ### ⌘W Sketchup.send_action('saveDocument;') ## Save ### ⌘S Sketchup.send_action('saveDocumentAs;') ## Save As... ### ⇧⌘S Sketchup.send_action('saveCopy;') ## Save A Copy As... Sketchup.send_action('saveAsTemplate;') ## Save As Template... Sketchup.send_action('revertDocumentToSaved;') ## Revert Sketchup.send_action('sendToLayOut;') ## Send to LayOut Sketchup.send_action('importFromGoogleEarth;') ## Add Location... Sketchup.send_action('clearLocation;') ## Clear Location Sketchup.send_action('toggleTerrain;') ## Show Terrain Sketchup.send_action('browse3DWarehouse;') ## Get Models... Sketchup.send_action('shareWithGoogleEarthCommunity;') ## Share Model... Sketchup.send_action('runImporter;') ## Import... Sketchup.send_action('runPageLayout;') ## Page Setup... ### ⇧⌘P Sketchup.send_action('runDocumentSetup;') ## Document Setup... Sketchup.send_action('printDocument;') ## Print... ### ⌘P # Edit Sketchup.send_action('editUndo;') ## Undo ### ⌘Z Sketchup.send_action('editRedo;') ## Redo ### ⇧⌘Z Sketchup.send_action('cut;') ## Cut ### ⌘X Sketchup.send_action('copy;') ## Copy ### ⌘C Sketchup.send_action('paste;') ## Paste ### ⌘V Sketchup.send_action('pasteInPlace;') ## Paste In Place Sketchup.send_action('editDelete;') ## Delete Sketchup.send_action('eraseConstructionGeometry;') ## Delete Guides Sketchup.send_action('selectAll;') ## Select All ### ⌘A Sketchup.send_action('deselectAll;') ## Select None ### ⇧⌘A Sketchup.send_action('editHide;') ## Hide ### ⌘E Sketchup.send_action('editUnhide;') ## Selected Sketchup.send_action('editUnhideLast;') ## Last Sketchup.send_action('editUnhideAll;') ## All ### ⇧⌘E Sketchup.send_action('editLock;') ## Lock Sketchup.send_action('editUnlockSelected;') ## Selected Sketchup.send_action('editUnlockAll;') ## All Sketchup.send_action('makeComponent;') ## Make Component... ### ⇧⌘G Sketchup.send_action('makeGroup;') ## Make Group ### ⌘G Sketchup.send_action('closeGroupOrComponent;') ## Close Group/Component ### ⇧⌘G Sketchup.send_action('intersectWithModel;') ## With Model Sketchup.send_action('intersectSelected;') ## With Selection Sketchup.send_action('intersectWithContext;') ## With Context # View Sketchup.send_action('toggleToolPalette;') ## Large Tool Set Sketchup.send_action('toggleSolidModelToolPalette;') ## Solid Tools Sketchup.send_action('toggleGoogleToolPalette;') ## Location Sketchup.send_action('toggleWarehouseToolPalette;') ## Warehouse Sketchup.send_action('togglePageTabsDsiplay;') ## Scene Tabs Sketchup.send_action('viewShowHidden;') ## Hidden Geometry Sketchup.send_action('sectionToggleDisplay;') ## Section Planes Sketchup.send_action('sectionToggleActivation;') ## Section Cuts Sketchup.send_action('viewShowAxes;') ## Axes Sketchup.send_action('viewShowGuides;') ## Guides Sketchup.send_action('toggleShadows;') ## Shadows Sketchup.send_action('toggleFog;') ## Fog Sketchup.send_action('toggleDisplayEdges;') ## Edges Sketchup.send_action('toggleDisplayBackEdges;') ## Back Edges Sketchup.send_action('toggleProfiles;') ## Profiles Sketchup.send_action('toggleDepthQue;') ## Depth Cue Sketchup.send_action('toggleExtensions;') ## Extension Sketchup.send_action('toggleGlobalTransparency;') ## X-ray Sketchup.send_action('renderWireframe;') ## Wireframe Sketchup.send_action('renderHiddenLine;') ## Hidden Line Sketchup.send_action('renderShaded;') ## Shaded Sketchup.send_action('renderTextures;') ## Shaded With Textures Sketchup.send_action('renderMonochrome:') ## Monochrome Sketchup.send_action('toggleHideRestOfModel;') ## Hide Rest of Model Sketchup.send_action('toggleHideSimilarComponents;') ## Hide Similar Components Sketchup.send_action('pageAdd;') ## Add Scene Sketchup.send_action('pageUpdate;') ## Update Scene Sketchup.send_action('pageDelete;') ## Delete Scene Sketchup.send_action('pagePrevious;') ## Previous Scene Sketchup.send_action('pageNext;') ## Next Scene Sketchup.send_action('slideshowStart;') ## Play Sketchup.send_action('pageOptions;') ## Settings Sketchup.send_action('toggleToolbarShown;') ## Hide Toolbar Sketchup.send_action('runToolbarCustomizationPalette;') ## Customize Toolbar ... # Draw Sketchup.send_action('selectLineTool;') ## Line ### ⌘L Sketchup.send_action('selectFreehandTool;') ## Freehand ### ⌘F Sketchup.send_action('selectArc3PointTool;') ## Arc ### ⌘J Sketchup.send_action('selectArcTool;') ## 2 Point Arc Sketchup.send_action('select3PointFitArcTool;') ## 3 Point Arc Sketchup.send_action('selectArcPieTool;') ## Pie Sketchup.send_action('selectRectangleTool;') ## Rectangle ### ⌘K Sketchup.send_action('selectRectangle3PointTool;') ## Rotated Rectangle Sketchup.send_action('selectCircleTool;') ## Circle Sketchup.send_action('selectPolygonTool;') ## Polygon # Camera Sketchup.send_action('viewUndo;') ## Previous Sketchup.send_action('viewRedo;') ## Next Sketchup.send_action('viewTop;') ## Top ### ⌘1 Sketchup.send_action('viewBottom;') ## Bottom ### ⌘2 Sketchup.send_action('viewFront;') ## Front ### ⌘3 Sketchup.send_action('viewBack;') ## Back ### ⌘4 Sketchup.send_action('viewLeft;') ## Left ### ⌘5 Sketchup.send_action('viewRight;') ## Right ### ⌘6 Sketchup.send_action('viewIso;') ## Iso ### ⌘7 Sketchup.send_action('viewParallelProjection;') ## Parallel Projection Sketchup.send_action('viewPerspective;') ## Perspective Sketchup.send_action('viewTwoPointPerspective;') ## Two-Point Perspective Sketchup.send_action('cameraMatchNewPhoto;') ## Match New Photo... Sketchup.send_action('editPhotoMatch;') ## Edit Matched Photo Sketchup.send_action('selectOrbitTool;') ## Orbit ### ⌘B Sketchup.send_action('selectDollyTool;') ## Pan ### ⌘R Sketchup.send_action('selectZoomTool;') ## Zoom Sketchup.send_action('selectFieldOfViewTool;') ## Field of View Sketchup.send_action('selectZoomWindowTool;') ## Zoom Window Sketchup.send_action('viewZoomExtents;') ## Zoom Extents Sketchup.send_action('viewZoomToSelection;') Sketchup.send_action('viewZoomImage;') ## Zoom to Photo Sketchup.send_action('selectPositionCameraTool;') ## Position Camera Sketchup.send_action('selectWalkTool;') ## Walk Sketchup.send_action('selectTurnTool;') ## Look Around Sketchup.send_action('selectImageIglooTool;') ## Image Igloo # Tools Sketchup.send_action('selectSelectionTool;') ## Select Sketchup.send_action('selectEraseTool;') ## Eraser Sketchup.send_action('selectPaintTool;') ## Paint Bucket Sketchup.send_action('selectMoveTool;') ## Move ### ⌘0 Sketchup.send_action('selectRotateTool;') ## Rotate ### ⌘8 Sketchup.send_action('selectScaleTool;') ## Scale ### ⌘9 Sketchup.send_action('selectPushPullTool;') ## Push/Pull Sketchup.send_action('selectExtrudeTool;') ## Follow Me Sketchup.send_action('selectOffsetTool;') ## Offset Sketchup.send_action('selectOuterShellTool;') ## Outer Shell Sketchup.send_action('selectUnionTool;') ## Union Sketchup.send_action('selectDifferenceTool;') ## Subtract Sketchup.send_action('selectDifferenceNDTool;') ## Trim Sketchup.send_action('selectIntersectTool;') ## Intersect Sketchup.send_action('selectBooleanSplitTool;') ## Split Sketchup.send_action('showSolidModelToolsMenu;') ## Split Sketchup.send_action('selectMeasureTool;') ## Tape Measure ### ⌘D Sketchup.send_action('selectProtractorTool;') ## Protractor Sketchup.send_action('selectAxisTool;') ## Axes ### ⌘F Sketchup.send_action('selectDimensionTool;') ## Dimensions Sketchup.send_action('selectTextTool;') ## Text Sketchup.send_action('doThreeDText;') ## 3D Text Sketchup.send_action('selectSectionPlaneTool;') ## Section Plane ### ⌘Y # Window Sketchup.send_action('performMiniaturize;') ## Minimize ### ⌘M Sketchup.send_action('performZoom;') ## Zoom Sketchup.send_action('showModelPropertiesPanel;') ## Model Info ### ⇧⌘I Sketchup.send_action('entityProperties;') ## Entity Info ### ⌘I Sketchup.send_action('orderFrontColorPanel;') ## Materials ### ⇧⌘C Sketchup.send_action('showComponentBrowser;') ## Components Sketchup.send_action('showStyleBrowser;') ## Styles Sketchup.send_action('showLayerPanel;') ## Layers Sketchup.send_action('showOutliner;') ## Outliner Sketchup.send_action('showPagePanel;') ## Scenes Sketchup.send_action('orderFrontFontPanel;') ## Show Fonts ### ⌘T Sketchup.send_action('showRubyConsole;') ## Ruby Console Sketchup.send_action('showShadowsPanel;') ## Shadows Sketchup.send_action('showFogSettingsPanel;') ## Fog Sketchup.send_action('showPhotoMatchPanel;') ## Match Photo Sketchup.send_action('showSoftenEdgesPanel;') ## Soften Edges Sketchup.send_action('showInstructor;') ## Instructor Sketchup.send_action('browse3DWarehouse;') ## 3D Warehouse Sketchup.send_action('browseExtensionStore;') ## Extension Warehouse Sketchup.send_action('toggleInspectors;') ## Hide Dialogs Sketchup.send_action('getPhotoTexture;') ## Photo Textures !!!!!!!!!!!! not working Sketchup.send_action('arrangeInFront;') ## Bring All to Front # Help Sketchup.send_action('showWelcomePanel;') ## Welcome To SketchUp… Sketchup.send_action('showOnlineHelpCenter;') ## Knowledge Center Sketchup.send_action('contactUs;') ## Contact Us # Orphans Sketchup.send_action('fixNonPlanarFaces;') ## Model Info >> Statistics >> Fix ProblemsI may have missed some...
john
Advertisement