Functions and constants relating to Sets
A valid type code (SET_PART, etc.)
The set id. If +ve, the internal number starting at 1. If -ve, the external label of the set. Internal numbers will be many times faster to process.
Returns |
Object with the following properties:
| Name | Type | Description |
| list | array of integers | Internal entity indices |
| nn | integer | Number of entities in list |
object
Example
// Get a list of parts in the 5th SET_PART
if(a = GetItemsInSet(SET_PART, 5))
{
var nparts = a.nn;
for(var i=0; i<nparts; i++)
{
Message("Part: " + GetLabel(PART, a.list[i]));
}
}
|
GetSetInfo(set_type[integer], set_id[integer]) [static]DescriptionReturns information about a set in the current model |
A valid type code (SET_PART, etc.)
The set id. If +ve, the internal number starting at 1. If -ve, the external label of the set. Internal numbers will be many times faster to process.
Returns |
Object with the following properties:
| Name | Type | Description |
| label | integer | The label of the set |
| name | string | The name of the set |
| nn | integer | Number of items in the set |
object
Example
// Print the name of the first *SET_PART in the current model
var info = GetSetInfo(SET_PART, 1);
Print("Set name = " + info.name + "\n");
|