Defines the feature identifier, i.e. the name primarily assigned to the feature at creation before any renaming has been done.
Defines the feature name.
Describes the URL that the user can add to a relation by clicking the Comment and URLs icon in the Knowledge Advisor workbench.
Describes the comment that the user can add in the Comment and URLs dialog box when adding a URL to a relation in the Knowledge Advisor workbench.
Lists the objects aggregated under an object.
Method allowing you to get/set the layer associated with a feature.
Create a part with several holes.
Add a real type parameter ("Real.1" for example) to one of the hole features. To do this, use the Parameter Explorer in the Knowledge Advisor product.
Create the rule below:
/* This rule resets the diameter of
the hole */ |
The available objects methods are displayed in the table below:
Retrieves the path of a feature. Note that this feature is not NLS (it will not be translated into your language and remains in english.)
feature.AbsoluteId(): String
String.2=PartBody\Pad.1.Id()
+ PartBody\Pad.1.AbsoluteId()
Returns the attribute type in the form of a string.
Returns the value of a boolean type parameter added to a given feature by using the Knowledge Advisor product. parameterName is the name of the boolean type parameter. It must be put between quotation marks (").This method enables you to read:
Unless you know perfectly that your feature has an attribute xxx, use before the HasAttribute method.
feature.GetAttributeBoolean(String): Boolean where the argument is name of the attribute.
Message ("The value of the Boolean.1 attribute of # is #",
PartBody\Pad.1.Name(),
PartBody\Pad.1.GetAttributeBoolean("Boolean.1"))
Returns the value of an integer type parameter added to a given feature by using the Knowledge Advisor product. parameterName is the name of the string type parameter. It must be put between quotation marks ("). This method enables you to read:
feature.GetAttributeInteger(String): Integer where String is name of the attribute. This name must be put between double-quotes.
Integer.3=PartBody\Hole.1 .GetAttributeInteger("Integer.2")
Returns the value of a real or Length (in m) type parameter added to a given feature by using the Knowledge Advisor product. parameterName is the name of the string type parameter. It must be put between quotation marks ("). This method enables you to read:
feature.GetAttributeReal(String): String where String is name of the attribute. This name must be put between double-quotes.
Returns the value of a string type parameter added to a given feature by using the Knowledge Advisor product. parameterName is the name of the string type parameter. This method enables you to read:
feature.GetAttributeString(String): String where String is name of the attribute. This name must be put between double-quotes.
String.2 =PartBody\Pad.1
.GetAttributeString("String.1")
Reads the attribute "attributeName" of the object and returns an object
feature.GetAttributeObject(String): Feature
where String is name of the attribute. This name must be put between double-quotes.
Determines whether the attribute specified in the argument belongs to the feature to which the method is applied.
feature.HasAttribute(String): Boolean
where String is name of the attribute. This name must be put between double-quotes.
Boolean.2 =
PartBody\Hole.1.HasAttribute("Real.1")
Obsolete. You can now use the Id attribute.
Determines whether the feature specified in the argument is the parent of the feature to which the method is applied. featureName must be put between quotation marks (").
feature.IsOwnedBy(): Boolean
Boolean.1=PartBody\Hole.1.IsOwnedBy(PartBody)
Function indicating if the object passed in argument implements a given type.
H:Hole
H->IsSupporting("TaperedHole") == true
Obsolete. You can now use the Name attribute.
Assigns the value specified in the second argument to the parameter whose name is specified in the first argument. parameterName is the name of the boolean type parameter whose value is to be modified. It must be put between quotation marks ("). booleanvalue is either TRUE or FALSE. It is created only if it can be created using the Parameters Explorer.
feature.SetAttributeBoolean(String, Boolean): Void where the first argument is name of the attribute and the second is the value to be assigned to it.
if PartBody\Pad.1\Boolean.1
<> true
PartBody\Pad.1.SetAttributeBoolean("Boolean.1",
true)
Assigns the value specified in the second argument to the parameter whose name is specified in the first argument. parameterName is the name of the real type parameter whose value is to be modified. Put parameterName between quotation marks (").
feature.SetAttributeReal(String, Real): Void
where String is name of the attribute and Real the value to be assigned to the parameter (MKS dimensions).
if PartBody\Hole.1\Real.1
<> 3
PartBody\Hole.1
.SetAttributeReal("Real.1",3)
Assigns the value specified in the second argument to the parameter whose name is specified in the first argument. parameterName is the name of the string type parameter whose value is to be modified. parameterName and stringvalue must be put between quotation marks (").
feature.SetAttributeString(String, String): Void where the first argument is name of the attribute and the second is the value to be assigned to it.
if PartBody\Pad.1.GetAttributeString("String.1")
<> "String1"
PartBody\Pad.1
.SetAttributeString("String.1","This is a test")
Another syntax for the same rule is:
if PartBody\Pad.1\String.1
<> "String1"
PartBody\Pad.1.SetAttributeString("String.1","This
is a test")
Assigns the value specified in the second argument to the parameter whose name is specified in the first argument. parameterName is the name of the integer type parameter whose value is to be modified. parameterName must be put between quotation marks (").
feature.SetAttributeInteger(String, Integer): Void where the first argument is name of the attribute and the second is the value to be assigned to it.
if PartBody\Hole.1\Integer.1
<> 3
PartBody\Hole.1
.SetAttributeInteger("Integer.1", 3)
Assigns the value specified in the second argument to the parameter whose name is specified in the first argument. parameterName
is the name of the parameter whose value is to be modified. parameterName must be put between quotation marks ("). The unit used is the current one.feature.SetAttributeDimension(String, Real, String): Void Type where the first argument is name of the attribute, the second is the value to be assigned to it and the third is the type.
Writes the attribute "attributeName" of the object with what is referenced by the pointer o It will allow to pass literal to an object that needs to reference it (and that does not only need the value).
feature.SetAttributeObject(String, Feature): VoidType
Performs the update of a feature when necessary. It is available on relations sets, parameters sets, parameters, rule bases, constraints satisfactions, optimizations, and Knowledge pattern features. It has no impacts on the other objects.
feature.Update(): VoidType
Expression1 (P: #In PartFeature) |
It returns a list of strings corresponding to the name of the available attributes for a given object. The generated list depends not only on the Object Type but also on the object itself. That is to say, this method may return attributes that have been added dynamically on the object, either trough the Parameter Explorer command or through the SetAttribute methods.
ListAttributeNames (TypeFilter:String, DynamicOnly:Boolean): List
let x(List) |
Make sure that you have the BK2 license to use the method here below. |
Enables you to add a BKT type on all mechanical features and products.
Feature->AddExtension (type: String): UndefinedType Package: CATPackageMethodObject
P : Part |
Make sure that you have the BK2 license to use the method here below. |
Enables you to remove a BKT type on all mechanical features and products.
Feature->RemoveExtension (type: String) IntegerPackage: TechnologicalObjectsLibraryFunctions
p : Part |