# Scripting Resources

This is a starting page for the Roomle scripting knowledge base. It is intended for all content creators, that do involve themselves in the creation of the component definitions (scripts).

This guide is a work in progress and not everything has already been included. We appreciate any feedback if you find some errors, you have difficulties with understanding some topics, etc. Should this be the case, please contact your Roomle representative.

# How To Start & Environment Setup


# Scripting Course

  • Prerequisities and expectations from the reader
  • Component Definition Basics
    • Parameters
      • Example: Adding Width and Depth Parameters
    • On Update
    • Geometry
    • Article Numbers
  • Parameters
    • Parameter attributes
    • Parameter's Relevant Values
    • Parameter Types and Unit Types
    • Working with Imperial Measurements - Inches and Feet
    • Value Objects
    • Example: Parametrized Table Value Combinations
    • Creating and Updating Values with Thumbnails
    • Ranges
    • Parameter Groups
      • Example: Parameter Grouping
    • Examples of Parameters and their UI Represenatations
  • RoomleScript Overview
    • What is RoomleScript?
    • Roomle Script Basic overview
      • Internal Variables
      • Comments
      • Operators and Expressions
      • Branching
      • Loops
      • Context
      • Available functions
      • Internal values
      • Custom functions
      • Arrays
  • Example: Scripting a Parameterized Table and Implementing Client Feedback
  • Example: Parametrized shelf system
  • SubComponents
    • Attributes of SubComponent
    • Back-reference
    • SubComponents Use Cases Examples
      • External Geometry
        • Example: Using SubComponent's Geometry
      • Part List Entry
        • Example: Adding Mounting Parts to the Parametrized Shelf
        • Example: Part List Pattern
      • External Computation
      • Parameter Provider
      • ElementType Pattern
  • Docking Basics
    • Minimum Docking Example
    • Example: Two-Way Docking of Parametrized Shelf
    • Docking Assignments
    • Example: Shared walls between the parametrized shelves
    • Docking Ranges
    • Multi-Selection Parameter Error Topic
    • Addons and Possible Children
      • Possible Child: itemId vs componentId - thumbnail, sort, category
      • Hiding Addons in the List
      • Addons in Parameter Groups
      • Docking Multiple Components
  • Global Parameters and Parameter Context
    • Parameter Context
    • Global Parameters
      • Global Parameter
      • Global and Local Parameter
    • Example: Adjusting global parameters in the parametrized shelf system.
  • 3D Models & Meshes
    • Theory
    • AddMesh
    • Primitives, UV settings and Bevels
    • AddPrism
      • Example: Drawer Front with Handle from AddPrism
      • Example: Window Frame
    • AddExternalMesh
    • Pivot Convention
    • Scalable Mesh Example
  • Advanced Part List Topics
    • Packaging
    • Component Label
      • Where are component labels used?
    • Part List Grouping
  • Dimensioning
    • Measurement Box
      • Example: Overriding Bounding Box
    • Custom Dimensions
  • Pricing
  • Using GetMaterialPropery Function
  • Advanced Docking Logic (work in progress)
    • Utilizing connection.isPreview Check
    • Storing Data in the connection Context in assignmentScripts
    • Sibling Points
      • Example: Grid Shelf System
      • Example: Deciding Which of the Neighbours Should Draw a Post in the 4 Post Shelf System
    • Docking Ranges
      • Getting Connection Index
      • Limiting Amount of Children Docked in a Range
      • Docking Range Examples
      • Collision Detection in the Docking Ranges
      • Collisions Inside a Range
      • Example: Infills for the Parametrized Shelf
      • Collisions Between More Ranges
      • Example: Detecting Neighbouring Door in a Modular Garden Shed
      • Example: Interior Accessory Docking in a Modular Garden Shed
    • Docking Lines
      • Example: Stackable Shelving System
    • Docking Line Ranges

List of all examples json files that are mentioned in the Scripting Course


# Scripting Reference Documentation



# Scripting Examples


# Scripting Templates and Case Studies


# Rubens Admin for Content Creators


# Changelog

  • 7.4.2021
    • Added a subchapter about part list grouping in the Advanced Part List Logic chapter.
    • Added notes on good practices to the Docking Basics chapter.
    • Added new loader snippet variants.
    • Roomle Formatter Version 1.2.1
    • Added "Storing Data in the connection Context in assignmentScripts" in the Advanced Docking Logic chapters
  • 1.4.2021
    • Added an instruction on parameter thumbnails in the parameters chapter.
    • Deleted chapters How to import materials in Rubens Admin, When and how to use which CSV template for Rubens Admin data import, which moved to the Rubens Admin documentation section.
    • Roomle Formatter Version 1.2.0
  • 22.3.2021
    • moved data import content to Rubens Admin documentation
  • 20.3.2021
  • 26.2.2021
    • changed the naming of Roomle Product Data Cloud (PDC) to Rubens Admin
    • updated Roomle Formatter 1.0.0
    • reorganized scripting documentation landing page in a way for the user to be more clear where to start
    • added a note about Object parameter type
    • added a note about meshes upload
    • added a subchapter about component labels in the configurator
    • added a mention on how to integrate the price service
  • 21.11.2020
    • added first part of the Advanced Docking Logic chapter
      • added extensive subchapter sibling on docking points and their utilization in a grid-patterned dock shelf system
      • added example on quad post shelf system
      • added wardrobe example
  • 14.11.2020
    • reviewed the Docking basics chapter, added subchapter about addons
    • added an example of an office table system
    • separated chapter Parameters from Component Definition Basics
    • added/updated examples of how parameters render in the UI
    • added information about switching units to inches and millimeters
  • 7.11.2020
    • new example and template: simple colour-changing product configurator
    • new example: 4 post shelf system with complex logic
    • added some notes in the "How to import materials in PDC" chapter
    • added chapter about the GetMaterialProperty functionality
  • 23.10.2020
    • added article on pricing in Roomle Configurator
  • 16.10.2020
    • added real-world examples for chairs and sofa systems
    • fixed broken links
  • 2.10.2020
    • added dimensioning chapter
  • 25.9.2020
    • new chapter "3D Models & Meshes"
    • improved this index file by adding subchapters