Loop to Create Multiple Lines - Catscript Typing CST Test
Loading…
Loop to Create Multiple Lines — Catscript Code
This script draws 5 lines along the X-axis with incrementing coordinates.
Dim partDoc As PartDocument
Set partDoc = CATIA.ActiveDocument
Dim part As Part
Set part = partDoc.Part
Dim factory As ShapeFactory
Set factory = part.ShapeFactory
Dim i As Integer
For i = 1 To 5
Dim line As Line
Set line = factory.AddNewLineCoord(i*10, 0, 0, i*10, 10, 0)
Next i
part.UpdateCatscript Language Guide
CatScript is a lightweight, interpreted scripting language designed for creative coding, educational purposes, and playful programming projects. It emphasizes simplicity, fun, and accessibility for beginners while supporting modular scripts and animations.
Primary Use Cases
- ▸Teaching programming to beginners
- ▸Simple animations and games
- ▸Interactive storytelling
- ▸Prototyping creative apps
- ▸Educational coding platforms
Notable Features
- ▸Simple syntax with minimal boilerplate
- ▸Event-driven programming support
- ▸Built-in animation and drawing functions
- ▸Interactive console for immediate feedback
- ▸Modular script support for reusability
Origin & Creator
CatScript was developed by indie developers and educators seeking a playful scripting language to teach programming concepts to beginners and hobbyists.
Industrial Note
While not industrial-grade, CatScript is popular in educational tools, coding workshops, and creative coding communities where ease-of-use and rapid experimentation are more important than performance or safety-critical guarantees.