forked from SketchUp/ruby-api-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
227 lines (169 loc) · 10.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- VIEWPORT -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- AUTHOR and GENERATOR -->
<meta name="author" content="SketchUp Extensibility Team">
<meta name="generator" content="YARD https://yardoc.org">
<!-- TITLE -->
<title>
File: SketchUp Ruby API — SketchUp Ruby API Documentation
</title>
<!-- SHORTCUT ICON -->
<link rel="shortcut icon" type="image/vnd.microsoft.icon"
href="favicon.ico" />
<!-- GENERIC META PROPERTIES -->
<meta name="url" content="https://ruby.sketchup.com/file.README.html" />
<meta name="image" content="https://ruby.sketchup.com/images/Ruby.svg" />
<meta name="title" content="File: SketchUp Ruby API" />
<meta name="name" content="SketchUp Ruby API Documentation" />
<meta name="description" content="SketchUp Ruby API" />
<!-- OPEN GRAPH META PROPERTIES -->
<meta property="og:site_name" content="SketchUp Ruby API Documentation" />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://ruby.sketchup.com/images/Ruby.svg" />
<meta property="og:image:width" content="60" />
<meta property="og:image:height" content="60" />
<meta property="og:title" content="File: SketchUp Ruby API" />
<meta property="og:url" content="https://ruby.sketchup.com/file.README.html" />
<meta property="og:description" content="SketchUp Ruby API" />
<!-- TWITTER CARD META PROPERTIES -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@sketchup" />
<meta name="twitter:title" content="File: SketchUp Ruby API" />
<meta name="twitter:description" content="SketchUp Ruby API" />
<meta name="twitter:image:src" content="https://ruby.sketchup.com/images/Ruby.svg?s=120" />
<meta name="twitter:url" content="https://ruby.sketchup.com/file.README.html" />
<!-- STYLESHEETS -->
<link rel="stylesheet" type="text/css"
href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic" />
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="css/sketchup.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="css/rubyapi.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="css/rouge.css" type="text/css" charset="utf-8" />
<!-- SCRIPTS -->
<script type="text/javascript">
pathId = "README";
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery-migrate.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
<script>
// Every time this page is loaded, it sends this action to SketchUp, telling
// SketchUp that a new page has loaded that has example snippets that should
// be replaced with code editors. Nothing happens if the page is loaded in a
// regular browser outside of the SketchUp client.
$( document ).ready(function() {
if (typeof sketchup == 'object') {
sketchup.page_loaded();
}
});
</script>
</head>
<body>
<!-- SU - start -->
<header id="navbar" role="banner" class="navbar navbar-fixed-top navbar-inverse">
<div id="api-documentation-header">
<div class="navbar-header">
<a class="logo navbar-btn pull-left" href="https://developer.sketchup.com" title="Home">
<img src="images/sketchup-logo.svg" alt="SketchUp">
</a>
<a class="name navbar-brand" href="/en" title="Home">SketchUp Developer Center</a>
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse">
<nav role="navigation">
<ul class="menu nav navbar-nav">
<li class="first leaf"><a href="https://forums.sketchup.com/c/developers">Community</a></li>
<li class="leaf"><a href="https://blog.sketchup.com/">SketchUp Blog</a></li>
<li class="leaf"><a href="https://www.sketchup.com/download" class="top-menu--download-button">Download</a></li>
<li class="last expanded dropdown">
<a href="https://www.trimble.com" class="trimble-top-menu-item dropdown-toggle" data-target="#" data-toggle="dropdown"><img src="images/trimble-logo-white.svg" alt="Trimble"><span class="caret"></span></a>
<ul class="dropdown-menu">
<li class="first leaf"><a href="https://connect.trimble.com/">Trimble Connect</a></li>
<li class="leaf"><a href="https://www.trimble.com/Corporate/About_Trimble.aspx">About Trimble</a></li>
<li class="last leaf"><a href="https://buildings.trimble.com/">Trimble Buildings</a></li>
</ul>
</li>
</ul>
</nav>
</div>
</div>
</header>
<!-- SU - end -->
<div id="su-content">
<div class="nav_wrap">
<iframe id="nav" src="class_list.html"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="_index.html">Index</a> »
<span class="title">File: SketchUp Ruby API</span>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><div id='filecontents'>
<h1 id="label-SketchUp+Ruby+API">SketchUp Ruby API</h1>
<p>The SketchUp Ruby API allows you to interact with SketchUp models and the SketchUp application. It is available from within SketchUp, it cannot be used by itself.</p>
<p>
Get started with the <a href="_index.html">Ruby API Overview</a>.
</p>
<p>Visit our <a href="https://developer.sketchup.com">SketchUp Developer Center</a> for more information and resources on SketchUp's APIs.</p>
<h2 id="label-LayOut+API">LayOut API</h2>
<p>As of SketchUp 2018 you can also create and manipulate LayOut documents. For more information refer to the <a href="file.LayOut.html" title="LayOut API Overview">LayOut API Overview</a>.</p>
<p>Currently the LayOut Ruby API is only available from SketchUp.</p>
<h2 id="label-Examples+and+Tutorials">Examples and Tutorials</h2>
<h3 id="label-Getting+Started">Getting Started</h3>
<p>To get you started we have a collection of examples of tutorials. These will take you through various common scenarios and concepts of the SketchUp API.</p>
<p><a href="https://github.com/SketchUp/sketchup-ruby-api-tutorials">github.com/SketchUp/sketchup-ruby-api-tutorials</a></p>
<h3 id="label-Ruby+C+Extensions+within+SketchUp">Ruby C Extensions within SketchUp</h3>
<p>Ruby itself allows you to work with Ruby code via C (and C++). This allows for more complex functionality and possible performance improvements. We provide examples on how to create Ruby C Extensions that work with various SketchUp versions and platforms:</p>
<p><a href="https://github.com/SketchUp/ruby-c-extension-examples">github.com/SketchUp/ruby-c-extension-examples</a></p>
<h2 id="label-Debugging">Debugging</h2>
<p>To make debugging SketchUp Ruby extensions easier we have a Ruby debugger interface that can be added to your SketchUp installation. This will let you use the debugging functionality of IDEs/editors that support the Ruby Debug protocol:</p>
<p><a href="https://github.com/SketchUp/sketchup-ruby-debugger">github.com/SketchUp/sketchup-ruby-debugger</a></p>
<p>We also have a guide on setting up RubyMine as an example of how you can set up your debugger:</p>
<p><a href="https://github.com/SketchUp/sketchup-ruby-api-tutorials/wiki/RubyMine-Debugger-Setup">github.com/SketchUp/sketchup-ruby-api-tutorials/wiki/RubyMine-Debugger-Setup</a></p>
<h2 id="label-Testing">Testing</h2>
<p>The standard testing frameworks for Ruby usually assume your tests are run from Ruby's console interpreter. This pose a problem when you want to set up unit tests for your code that needs to run within SketchUp.</p>
<p>To address this we created TestUp, a wrapper on top of <a href="https://github.com/seattlerb/minitest" target="_parent" title="Minitest">Minitest</a> that works within SketchUp along with a GUI interface to manage your tests.</p>
<p><a href="https://github.com/SketchUp/testup-2">github.com/SketchUp/testup-2</a></p>
<h2 id="label-Tools">Tools</h2>
<p>Give your IDE insight to the SketchUp Ruby API by feeding it stubs:</p>
<p><a href="https://github.com/SketchUp/ruby-api-stubs">github.com/SketchUp/ruby-api-stubs</a></p>
<p>As an example of how to set up your IDE we created an example that describe the process for RubyMine:</p>
<p><a href="https://github.com/SketchUp/sketchup-ruby-api-tutorials/wiki/RubyMine-Project-Setup#making-the-ide-sketchup-api-aware">github.com/SketchUp/sketchup-ruby-api-tutorials/wiki/RubyMine-Project-Setup#making-the-ide-sketchup-api-aware</a></p>
<p>VSCode example:</p>
<p><a href="https://github.com/SketchUp/sketchup-extension-vscode-project">github.com/SketchUp/sketchup-extension-vscode-project</a></p>
<h2 id="label-Documentation">Documentation</h2>
<p>If you find a typo, unclear description etc in the documentation, please log a new issue in the issue tracker for our APIs: <a href="https://github.com/SketchUp/api-issue-tracker/issues">github.com/SketchUp/api-issue-tracker/issues</a></p>
</div></div>
<div id="footer">
Generated by
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
</div>
</div>
</div>
</body>
</html>