Standard Types

This page discusses:

Feature

Inheritance Path

ObjectType
 Feature

Attributes

Name Type Comment
Children List Lists the objects aggregated under an object (usually the objects in the tree). It does not return the parameters aggregated under an object. This attribute cannot be modified. The list can be empty.
Name String Defines the feature name. This name can be read or written. It usually corresponds to the name in the tree.
NamedURLs List Describes the URL you can add to an object clicking the Comment and URLs icon in the Engineering Rules Capture app. It can also be modified. Not all the objects support this capability.
Owner Feature -
PrimaryType Type -
UserInfoComment String Describes the comment that the user can add in the Comment and URLs dialog box when adding a URL to an object in the Engineering Rules Capture app. This comment can be modified in the rule. Not all the objects are supporting this capability.
Note: this attribute is available for parameters and features.

Example

The example below adds a URL at the bottom of a URL list associated with NamedURLs parameters using a ValuePointer.

Let VP (ValuePointer)
Let URLs(list)

// Assign the parameter to Value Pointer variable, by any of the following method. 
//TestInt is an integer type user parameter
// set VP = TestInt
// VP->ValuatePointer(TestInt,"","Integer")
VP = Parameters->GetAttributeValuePointer("TestInt")

if(VP==NULL)
                exit

// URL can be associated with a parameter by using 'NamedURLs' attribute of ValuePointer
// First we have to retrieve all the URLs associated with the parameter
URLs = VP.NamedURLs

// To add an URL to a parameter, we require object of type 'KWANamedURL'
Let myURL(KWANamedURL)

// We initialize myURL and set its attributes (i.e. Name and URL location)
myURL = new("KWANamedURL","myURL",Parameters)
myURL.URLName="3ds"
myURL.URLLocation="http://www.3ds.com"

// Now we add the new URL at the end of the list of URLs
URLs.Append(myURL)

// We update the list of URLs associated with parameter
VP.NamedURLs=URLs

List

Inheritance Path

ObjectType
 Feature
  List
Let lst (List)
lst.Append("car")
Message("#", lst[1])
lst[1] = "wheel"
Note: When affecting a list, pay attention to volatile lists copied to persistent ones. If the volatile list contains a large number of items, the persistent one contains a large number of items as well, which impacts performance. The following mathematical expression 3*x+1 ==> (3*x) + 1 can be encoded as follows:
List("+",
  List("*", 3, "x"),
  1
)

Literal

Inheritance Path

ObjectType
 Literal

Attributes

Name Type Comment
AuthorizedValues List Used to indicate if a value can be modified or not by the end user. This attribute is Read/Write.
Constant Boolean Used to indicate if a value can be modified or not by the end user. That is, if the value is locked or not. This attribute is Read/Write.
Show Boolean Used to indicate if a parameter must be hidden or shown in the tree. This attribute is Read/Write.
UserInfoComment String -

ObjectType

Inheritance Path

ObjectType

Pointer

Inheritance Path

ObjectType
 Feature
  Pointer

Attributes

Name Type Comment
AllowedType String -
Pointed UndefinedType -

Real

Inheritance Path

ObjectType
 Literal
  Real

Attributes

Name Type Comment
InferiorRange Real Used to apply an inferior range to a real number.
Real.2 =Real.1 .InferiorRange
Important: When the InferiorRange operator is applied to parameters, it lets you valuate ranges. If it is called on a parameter with no range, this operator valuates and applies the range (it corresponds to the check box in the interface). It is impossible to use the EKL to stop applying a range.
SemanticDimLowerLimit LENGTH -
SemanticDimSimpleLimit LENGTH -
SemanticDimTabValue String -
SemanticDimUpperLimit LENGTH -
SuperiorRange Real Used to apply a superior range to a real number.
Real.2 =Real.1 .SuperiorRange
Important: When the SuperiorRange operator is applied to parameters, it lets you valuate ranges. If it is called on a parameter with no range, this operator valuates and applies the range (it corresponds to the check box in the interface). It is impossible to use the EKL to stop applying a range.
ToleranceMax Real Lets you access the maximum tolerance that can be applied to parameters of Length and Angle type.
ToleranceMin Real Lets you access the minimum tolerance that can be applied to parameters of Length and Angle type.

RuleContext

Type used to represent the execution context of a Business Rule.

Inheritance Path

ObjectType
 Feature
  RuleContext

Attributes

Name Type Comment
CurrentDate Date Returns the current date at the time of the attribute evaluation.
Message String Can be valuated inside the rule to bring back messages to the end user. It is meaningful especially in the context of the validation opening. Returns a message to the app that uses the business rule opening.
NLSMessage NLSMessage Returns a message to the app that uses the business rule opening.
Note: On the server side, it should be used in priority since the NLS is located in the client runtime view.
Organization String Returns P&O information. Credentials selected at login (strings in read-only mode).
Project String Returns P&O information. Credentials selected at login (strings in read-only mode).
Role String Returns P&O information. Credentials selected at login (strings in read-only mode).
SecurityContext String Returns P&O information. Credentials selected at login (strings in read-only mode).
Severity Integer Integer that can be valuated inside the rule. It is especially meaningful in the context of the validation opening. By default, the severity is set to 1. It can be valuated in the rule to specify a higher severity. It can be interpreted in different ways depending on the opening. The caller of the opening uses this severity to determine if the validation completely prevents the action, or if it only raises a warning. We recommend that you set the severity to 1 to raise a warning and to 2 to indicate that the severity is higher and prevents the operation.
  • 0 for information
  • 1 for a warning
  • 2 for limited
  • 3 for fatal
Note: Not to be used on the server side.
UserID String User ID. Returns P&O information.

ValuePointer

Inheritance Path

ObjectType
 Feature
  Pointer
   ValuePointer

Attributes

Name Type Comment
AuthorizedValues List -
Constant Boolean Used to indicate if a value can be modified or not by the end user that is, if the value is locked or not. This attribute is Read/Write.
 /* valuates R with the constantness of P */ 
						R = P.Constant
InferiorRange Real -
SuperiorRange Real -
ToleranceMax Real -
ToleranceMin Real -
Value Literal Lets you access the value in read and write mode.

Example

The example below lets you add 1 mm to all lengths in a Part.

let lAllSets, lAllLengths(List)
let a(AdvisorParameterSet)
let currentLength(ValuePointer)

lAllSets = myPart->Query("AdvisorParameterSet","")

for a inside lAllSets
{
                lAllLengths = a->ListAttributesValuePointers("LENGTH")
                for currentLength inside lAllLengths
                {
                                currentLength.Value = currentLength.Value:Length + 1mm
                }               
}

Visualizable

Inheritance Path

ObjectType
 Feature
  Visualizable

Attributes

Name Type Comment
Color String You can get and specify the color of a Generative Shape Design feature. The Color attribute is defined as a character string. The color can be specified either by its full name, its hexadecimal value, or its RGB value. You can find below the hexadecimal and RGB values of the main colors:

Color Names Hexadecimal Values RGB Values
black #000000; 0.0.0
green #00FF00; 0.255.0
gray #BEBEBE; 190.190.190
white #FFFFFF; 255.255.255
brown #A52A2A; 165.42.42
red #FF0000; 255.0.0
purple #A020F0; 160.32.240
navy blue #000080; 0.0.128
blue #0000FF; 0.0.255
magenta #FF00FF; 255.0.255
lime green #00FF00; 50.205.50
olive #808000; 128.0.128
yellow #FFFF00; 255.255.0

IsColorInherited Boolean Lets you determine if the color is defined on a given object or if the color is inherited.
IsTransparencyInherited Boolean Lets you determine if the color is defined on a given object or if the color is inherited.
Layer Integer You can get/set the layer associated with a feature. This attribute cannot be used in Drafting apps. You can find here two examples.

Expert Rule 1:

(for all)
G:GSMCurve 
 if G.Show == False 
 then G.Show = True

Expert Rule 2:

(for all)
P:GSMPoint 
 P.Color = blue 
 P.Show = False 
 Message (Curve pick is set to #, G.Pick) 
 P.Layer = 1 
 Message (Point layer is set to #, P.Layer)

Pick Boolean You can specify the "Pickable" status of a feature so that it can or cannot be selected in the work area. The Pick attribute must be specified by a Boolean.
Show Boolean Used to indicate if a parameter must be hidden or shown in the tree. This attribute is Read/Write and cannot be used in Drafting apps.
Transparency Integer

You can edit the transparency of EKL types that derive from the Visualizable type like a GeometricFeature. This attribute is used to specify the transparency. It varies from 0 (no transparency), the default value, to 255 (full transparency).

Example

let attributes (List)
let pad(GeometricFeature)
let faces (List)
let face (CATFace)

set pad=PartBody\Pad.1 
faces = pad->GetSubElements(2)
set face = faces[1]

face.Transparency=100
Message("Transparency=",face.Transparency)

Graphical Properties

Graphical properties are a set properties that you can apply to a feature. The supported graphical properties are:

  • the color
  • the type of the line
  • the thickness of the line
  • the degree of opacity
  • the visibility state (show/no show)
  • The selectability state (pick/no pick)

Those properties can be:

  • Transient: visible only in the current context (in the current editor/window/occurrence tree). Those properties are lost when you close and then open again.
  • Persistent: visible in every context containing your occurrence. Those properties are saved in database.

EKL lets you:

  • Access the Color and Show/NoShow graphical properties of a specific occurrence.
  • Edit the transient Color and Show/NoShow graphical properties on a specific occurrence.
  • Keep modifications by transforming all the transient graphical properties defined in the current context (occurrence tree/editor/window) into persistent graphical properties. Once saved, those properties are effective at each open and in all contexts.
  • Reset only transient graphical properties defined in the current occurrence tree.
  • Reset all graphical properties (transient and persistent) defined in the current occurrence tree.

Note: You cannot directly specify persistent graphical properties. If you want to do so, specify transient graphical properties using Visualizable services and then call KeepGraphicalModifications to transform transient graphical properties into persistent ones.