Skip to main content
Skip table of contents

API - JavaScript Editor

mnu_javascript.png
New611.png

This editor is a brand new device that enables to:

  • write a script in JavaScript language

  • access to the Help file about JavaScript programming

  • preview directly your program on the scene

  • validate the result.

Presentation

The API (Application Programming Interface) has been completely renewed for version 6.11. It is not anymore using Pascal programming language but Javascript.

JavaScript is a modern, easy to use, and easy to learn scripting language. GO2cam provides a Javascript API to write scripts and improve automation of your process.

Click on the API Help for more information: GO2cam Javascript API

Abilities

This API allows the user to:

  • Create or edit geometry,

  • Apply machining operations and opelists,

  • Edit machining and tools,

  • Create and Manage dialogs,

  • Load files and configurate GO2cam,

  • etc.

Compared to former API, writing scripts with Javascript offers much more possibilities:

  • Creation and manipulation of tables,

  • Mathematical calculation,

  • Easy creation of dialog boxes,

  • More interaction with GO2cam entities, in terms of selection and manipulation,

  • Keep the design history,

  • etc.

improve5-20240129-135302.png
  • Add new functionalities to create fillets or chamfers on solid (see GO2SSolid.ApplyFillet, GO2SFace, GO2SEdge)

  • If a function is missing, we display the file name and the line where the error occurs.

Macros

Standard macros have been reintroduced in V6.11 after their exclusion in the previous V6.10 version. Existing ones that were available in V6.09 have been re-written in the JavaScript language and also some new macros have been added.

Part Family

This macro allows to define several parts from the same family having similar geometrical features but with slightly varying dimension. This is done in a simple tabular format and is very useful in reducing the time to implement the machining cycles on all these parts.

You will find 2 videos below introducing this macro and showing an example on how to define a Part family.

Api_part family.png
Slide1.PNG

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.