Functions and constants relating to Parts
Details of functionsGetPartInfo(part_id[integer]) [static]DescriptionReturns information about a part in the current model |
Internal part number
Returns |
Object with the following properties:
| Name | Type | Description |
| alpha | integer | Part transparency (0-255) |
| blue | integer | Blue component of part colour (0-255) |
| green | integer | Green component of part colour (0-255) |
| include | integer | The include number part is in (0 if main file) |
| red | integer | Red component of part colour (0-255) |
| title | string | The part title |
object
Example
// Return the title of the first part in the model
var info = GetPartInfo(1);
Print("Part title = " + info.title + "\n");
|
GetPid(type_code[integer], item[integer], state_id (optional)[integer]) [static]DescriptionReturns the internal part id of internal <item> of type <type_code> |
A valid part-based element type code (e.g. SOLID, SHELL)
If +ve, the internal item number starting at 1. If -ve, the external label of the item. Internal numbers will be many times faster to process.
State number to be used instead of the current state
Returnsinteger Return typeNumber |