Element Attributes
SmartCAM elements can have attribute data associated with them. Attribute data is assigned to a given element, using a given name (the attribute name). The data is not visible in SmartCAM, but can be queried in macros or CGT (Code Generator Template) files. Once queried the data can be acted upon.
The attribute data can be string, decimal, or integer values. Each attribute is a pair - the attribute name and the attribute data. Attribute names are not case sensitive, so "ATTRIB" and "attrib" are the same.
There are two types of attributes: user and system. User attributes can be created, modified, and removed by users. System attributes are created by SmartCAM and users cannot modify or remove this data. This help topic lists the SmartCAM System attributes that are available for use in your code generator.
Refer to the Element Attributes section of Automation/Customization - MCL Reference - Reference: MCL Functions for more information. Scroll down to the Element Attributes section of the topic for a listing of the commands and formats used to work with the attribute data. These are all system attributes, accessed using ISYS(), DSYS(), and SSYS() functions.
System Attributes
The following table lists the published attribute names, return data type, and notes about what information it returns.
For Hole Patterns
Attribute | Data Type | Notes |
---|---|---|
hp_hole | Integer | Only relevant in context of code generation. Returns 1 if the selected element is from a circular hole pattern, otherwise returns the default value supplied as the 3rd parameter on the function call. |
hp_type | Integer | If the selected element is a hole pattern element, returns 1. Otherwise, returns the default value, supplied as the 3rd parameter in the function call. |
depth | Decimal | Returns the Depth value for a circular hole pattern element. |
b_angle | Decimal | Returns the Hole Axis Angle for the circular hole patterns. |
origin | String | Returns a formatted string that contains the three coordinate locations for the Origin of a circular hole pattern element. The string will include: "x-coordinate y-coordinate z-coordinate". |
radius | Decimal | Returns the Radius value for a circular hole pattern element. |
start_angle | Decimal | Returns the Start Angle value, in degrees, for a circular hole pattern element. |
angle_incr | Decimal | Returns the Increment angle between holes in a circular hole pattern element. A positive number means the next hole is in a CCW direction, a negative increment angle means the next hole is in a CW direction. |
num_holes | Integer | Returns the Number of Holes in a circular hole pattern element. |
lead | Integer | Check to see if element is part of a lead-in/out. If the element is a lead-in element, returns -1. If the element is a lead-out, returns 1. Otherwise, returns the default value provided as the 3rd parameter in the function call. |
For Hole Features
Attribute | Data Type | Notes |
---|---|---|
f_diam | Decimal | Returns the diameter of the hole feature. |
f_ta | Decimal | The taper angle of the hole feature. |
f_bt | Integer | The bottom type for the hole feature. Values are 1 = Thru Hole, 2 = Blind Hole, 3 = Fillet Hole, and 4 = Round Hole. |