# Data types

## String

A text value.

{% hint style="success" %}
Extends Ruby [String](https://ruby-doc.org/core-2.5.1/String.html) class.
{% endhint %}

## Integer

An integer numeric value.

{% hint style="success" %}
Extends Ruby [Integer](https://ruby-doc.org/core-2.5.1/Integer.html) class.
{% endhint %}

## Float

A decimal value.

{% hint style="success" %}
Extends Ruby [Float](https://ruby-doc.org/core-2.5.1/Float.html) class.
{% endhint %}

## Array

A list of objects.

{% hint style="success" %}
Extends Ruby [Array](https://ruby-doc.org/core-2.5.1/Array.html) class.
{% endhint %}

## Color

An object that represent a color.

{% hint style="success" %}
Extends SketchUp [Color](https://ruby.sketchup.com/Sketchup/Color.html) class.&#x20;

*<mark style="color:$primary;">⚠️ Setter functions are disabled</mark><mark style="color:red;">.</mark>*
{% endhint %}

## ComponentDefinition

An object that represents a SketchUp component definition.

{% hint style="success" %}
Extends SketchUp [ComponentDefinition](https://ruby.sketchup.com/Sketchup/ComponentDefinition.html) class.

*<mark style="color:$primary;">⚠️ Setter functions are disabled</mark><mark style="color:red;">.</mark>*
{% endhint %}

<table><thead><tr><th width="233.8515625">Function</th><th>Description</th></tr></thead><tbody><tr><td><code>get_dc_attribute(key)</code></td><td>Return the custom Dynamic Component attribute referenced by the <code>key</code> (<a href="#string">String</a>) name</td></tr></tbody></table>

## ComponentInstance

An object that represents a SketchUp component instance.

{% hint style="success" %}
Extends SketchUp [ComponentInstance](https://ruby.sketchup.com/Sketchup/ComponentInstance.html) class.

*<mark style="color:$primary;">⚠️ Setter functions are disabled.</mark>*
{% endhint %}

<table><thead><tr><th width="233.8515625">Function</th><th>Description</th></tr></thead><tbody><tr><td><code>get_dc_attribute(key)</code></td><td>Return the custom Dynamic Component attribute referenced by the <code>key</code> (<a href="#string">String</a>) name</td></tr><tr><td><code>local_x</code></td><td>Return the x coordinate relative to parent origin (<a href="#length">Length</a>)</td></tr><tr><td><code>local_y</code></td><td>Return the y coordinate relative to parent origin (<a href="#length">Length</a>)</td></tr><tr><td><code>local_z</code></td><td>Return the z coordinate relative to parent origin (<a href="#length">Length</a>)</td></tr><tr><td><code>world_x</code></td><td>Return the x coordinate relative to world origin (<a href="#length">Length</a>)</td></tr><tr><td><code>world_y</code></td><td>Return the y coordinate relative to world origin (<a href="#length">Length</a>)</td></tr><tr><td><code>world_z</code></td><td>Return the z coordinate relative to world origin (<a href="#length">Length</a>)</td></tr></tbody></table>

## Length

A numeric value that represents a length.

{% hint style="success" %}
Extends SketchUp [Length](https://ruby.sketchup.com/Length.html) class.
{% endhint %}

<table><thead><tr><th width="233.8515625">Operator</th><th>Description</th></tr></thead><tbody><tr><td><code>+</code> </td><td><code>Length + Length</code> → (<a href="#length">Length</a>)</td></tr><tr><td><code>*</code></td><td><code>Length * Length</code> → (<a href="#area">Area</a>)<br><code>Length * Area</code> → (<a href="#volume">Volume</a>)</td></tr></tbody></table>

## Area

A numeric value that represents an area.

{% hint style="success" %}
Extends all [Float](#float) properties and functions.
{% endhint %}

<table><thead><tr><th width="233.8515625">Operator</th><th>Description</th></tr></thead><tbody><tr><td><code>+</code> </td><td><code>Area + Area</code> → (<a href="#area">Area</a>)</td></tr><tr><td><code>*</code></td><td><code>Area * Length</code> → (<a href="#volume">Volume</a>)</td></tr></tbody></table>

<table><thead><tr><th width="233.8515625">Function</th><th>Description</th></tr></thead><tbody><tr><td><code>to_mm2</code></td><td>Return area as <a href="#float">float</a> value in mm<sup>2</sup></td></tr><tr><td><code>to_cm2</code></td><td>Return area as <a href="#float">float</a> value in cm<sup>2</sup></td></tr><tr><td><code>to_m2</code></td><td>Return area as <a href="#float">float</a> value in mm<sup>2</sup></td></tr><tr><td><code>to_km2</code></td><td>Return area as <a href="#float">float</a> value in km<sup>2</sup></td></tr><tr><td><code>to_inch2</code></td><td>Return area as <a href="#float">float</a> value in inch<sup>2</sup></td></tr><tr><td><code>to_feet2</code></td><td>Return area as <a href="#float">float</a> value in feet<sup>2</sup></td></tr><tr><td><code>to_mile2</code></td><td>Return area as <a href="#float">float</a> value in mile<sup>2</sup></td></tr><tr><td><code>to_yard2</code></td><td>Return area as <a href="#float">float</a> value in yard<sup>2</sup></td></tr></tbody></table>

## Volume

A numeric value that represents a volume.

{% hint style="success" %}
Extends all [Float](#float) properties and functions.
{% endhint %}

<table><thead><tr><th width="233.8515625">Operator</th><th>Description</th></tr></thead><tbody><tr><td><code>+</code> </td><td><code>Volume + Volume</code> → (<a href="#volume">Volume</a>)</td></tr></tbody></table>

<table><thead><tr><th width="233.8515625">Function</th><th>Description</th></tr></thead><tbody><tr><td><code>to_mm3</code></td><td>Return volume as <a href="#float">float</a> value in mm<sup>3</sup></td></tr><tr><td><code>to_cm3</code></td><td>Return volume as <a href="#float">float</a> value in cm<sup>3</sup></td></tr><tr><td><code>to_m3</code></td><td>Return volume as <a href="#float">float</a> value in mm<sup>3</sup></td></tr><tr><td><code>to_km3</code></td><td>Return volume as <a href="#float">float</a> value in km<sup>3</sup></td></tr><tr><td><code>to_inch3</code></td><td>Return volume as <a href="#float">float</a> value in inch<sup>3</sup></td></tr><tr><td><code>to_feet3</code></td><td>Return volume as <a href="#float">float</a> value in feet<sup>3</sup></td></tr><tr><td><code>to_mile3</code></td><td>Return volume as <a href="#float">float</a> value in mile<sup>3</sup></td></tr><tr><td><code>to_yard3</code></td><td>Return volume as <a href="#float">float</a> value in yard<sup>3</sup></td></tr><tr><td><code>to_fbm</code></td><td>Return volume as <a href="#float">float</a> value in FBM</td></tr></tbody></table>

## MaterialType

An object that represents a material type.

<table><thead><tr><th width="233.8515625">Function</th><th>Description</th></tr></thead><tbody><tr><td><code>is_solid_wood?</code></td><td>Return <code>true</code> if material type is <em>Solid Wood</em></td></tr><tr><td><code>is_sheet_good?</code></td><td>Return <code>true</code> if material type is <em>Sheet Good</em></td></tr><tr><td><code>is_dimensional?</code></td><td>Return <code>true</code> if material type is <em>Dimensional</em></td></tr><tr><td><code>is_hardware?</code></td><td>Return <code>true</code> if material type is <em>Hardware</em></td></tr><tr><td><code>is_edge?</code></td><td>Return <code>true</code> if material type is <em>Edge</em></td></tr><tr><td><code>is_veneer?</code></td><td>Return <code>true</code> if material type is <em>Veneer</em></td></tr><tr><td><code>to_i</code></td><td>Return material type as numeric value (<a href="#integer">Integer</a>)</td></tr></tbody></table>

## Material

An object that represents a material.

<table><thead><tr><th width="233.8515625">Property</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>Return the name of the material (<a href="#string">String</a>)</td></tr><tr><td><code>color</code></td><td>Return the color of the material (<a href="#color">Color</a>)</td></tr><tr><td><code>type</code></td><td>Return the type of the material (<a href="#materialtype">MaterialType</a>)</td></tr><tr><td><code>description</code></td><td>Return the description of the material (<a href="#string">String</a>)</td></tr><tr><td><code>url</code></td><td>Return the url of the material (<a href="#string">String</a>)</td></tr><tr><td><code>std_dimension</code></td><td>Return the standard dimension of the material (<a href="#string">String</a>)</td></tr><tr><td><code>std_thickness</code></td><td>Return the standard thickness of the material (<a href="#length">Length</a>)</td></tr><tr><td><code>std_width</code></td><td>Return the width of the material (<a href="#length">Length</a>)</td></tr></tbody></table>

<table><thead><tr><th width="233.8515625">Function</th><th>Description</th></tr></thead><tbody><tr><td><code>any?</code></td><td>Return <code>true</code> if a material is applied</td></tr><tr><td><code>empty?</code></td><td>Return <code>true</code> if material is "no material"</td></tr><tr><td><code>grained?</code></td><td>Return <code>true</code> if material is <em>grained</em></td></tr></tbody></table>

## Edge

An object that represents an edge.

{% hint style="success" %}
Extends all [Material](#material) properties and functions.
{% endhint %}

<table><thead><tr><th width="233.8515625">Property</th><th>Description</th></tr></thead><tbody><tr><td><code>material_name</code></td><td>Alias to <code>name</code></td></tr><tr><td><code>material_color</code></td><td>Alias to <code>color</code></td></tr></tbody></table>

## Veneer

An object that represent a veneer.

{% hint style="success" %}
Extends all [Material](#material) properties and functions.
{% endhint %}

<table><thead><tr><th width="233.8515625">Property</th><th>Description</th></tr></thead><tbody><tr><td><code>material_name</code></td><td>Alias to <code>name</code></td></tr><tr><td><code>material_color</code></td><td>Alias to <code>color</code></td></tr></tbody></table>

## Path

An array of instance names.

{% hint style="success" %}
Extends all [Array](#array) properties and functions.
{% endhint %}

## Batch

<table><thead><tr><th width="233.8515625">Properties</th><th>Description</th></tr></thead><tbody><tr><td><code>position</code></td><td>(<a href="#integer">Integer</a>)</td></tr><tr><td><code>count</code></td><td>(<a href="#integer">Integer</a>)</td></tr></tbody></table>

##


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opencutlist.org/features/parts/formulas/data-types.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
