Specifying a List of Entities

The BobCAD Lua scripting supports multiple types of entity lists that can be utilized by various functions.  These can be classified into 2 different groups:


1. Entity List - any list containing multiple entities.  These entities may or may not form a continuous chain.

2. Chain List - a chain list is a special type of entity list, in which the entities in the list will form a continuous open or closed chain.


What is a chain?

A chain is simply a list of entities that are connected to each other so that the end point of an entity is the same as the start point of the next entity.  Chains of entities may be open, meaning they begin in one location and end in a different location, or closed meaning the start point of the first entity in the chain is the same as the end point of the last entity of the chain. 


Types of supported entity lists

The following is the list of supported chain definitions in the BobCAD Lua scripting engine:


Entity Lists

  • Points - a simple list of XYZ positions that will be created with points.
  • ContourList - a list of entities in which each entity is fully defined.  The entities contained in this list do not need to be a continuous loop.


Chain Lists

  • Polyline - a list of XYZ points which will be created by connecting the points with line entities (no point entities will be created)
  • ContourChain - a chain of entities where the first entity is fully defined and each subsequent entity only requires it's end point.  The end point of the previous entity will be the start point of the current entity.  The entities will be a continuous loop.
  • EntityIDs - a chain of entities by entity ID of existing geometry items in the BobCAD entity database.  The ID's do not need to be in any specific order, as BobCAD will automatically form them into a chain.