Context Object Parameters
Parameter Name |
Type |
Read/Write |
Comments |
IndexSlider |
Integer |
Read |
Index of the pulling direction:
- 0: Main pulling direction
- n: nth secondary pulling direction
|
DraftAngle |
Integer |
Read |
Value of the draft angle |
SurfaceArea |
String |
Read |
Area of the faces |
ListAngles |
List |
Read |
Angles between the facets normal and the pulling
direction. |
NaturalDestination |
Integer |
Read |
Computed destination of the face. |
ForcesDestination |
Integer |
Read |
Manually assigned destination. |
Validation |
Bolean |
Write |
|
ErrorMessage |
String |
Write |
Error message |
ErrorLevel |
Integer |
Write |
Severity of the transfer error:
- 0: The transfer is validated.
- 1: A warning message is displayed.
- 2: An error message is displayed.
|
Sample
Let naturalDestination(Integer)
Let forcedDestination(Integer)
Let CavitySide(Integer)
Let CoreSide(Integer)
Let OtherSide(Integer)
Let NoDraftSide(Integer)
Let UndercutSide(Integer)
Let SliderSide(Integer)
CavitySide = 1
CoreSide = 2
OtherSide = 3
NoDraftSide = 4
UndercutSide = 5
SliderSide = 6
naturalDestination = Parameters.GetAttributeInteger("NaturalDestination")
forcedDestination = Parameters.GetAttributeInteger("ForcedDestination")
Parameters.SetAttributeInteger("ErrorLevel", 0)
Validation = true
if(naturalDestination == CavitySide And forcedDestination == CoreSide)
{
Parameters.SetAttributeInteger("ErrorLevel", 2)
Parameters.SetAttributeString("ErrorMessage", "A transfer between the Cavity and the Core side is not possible.")
Validation = false
}
if(naturalDestination == CoreSide And forcedDestination == CavitySide)
{
Parameters.SetAttributeInteger("ErrorLevel", 2)
Parameters.SetAttributeString("ErrorMessage", "A transfer between the Core and the Cavity side is not possible.")
Validation = false
}
if(naturalDestination == OtherSide And forcedDestination == CavitySide)
{
Parameters.SetAttributeInteger("ErrorLevel", 1)
Parameters.SetAttributeString("ErrorMessage", "A transfer between the Other and the Cavity side is dangerous.")
}
if(naturalDestination == OtherSide And forcedDestination == CoreSide)
{
Parameters.SetAttributeInteger("ErrorLevel", 1)
Parameters.SetAttributeString("ErrorMessage", "A transfer between the Other and the Core side is dangerous.")
}