KnowledgeExpert Methods

KnowledgeExpert Methods

This page discusses:

KWECheck.AddNewTuple()

Lets you add tuple under a check.

Signature

KWECheck.AddNewTuple(Validity : Boolean [, Object : Feature, ..]) : KWETuple

Arguments

NameInput / OutputRequired?TypeComment
ValidityInYesBooleanTrue (succeeded) or False (failed).
ObjectInNoFeatureObject to insert: objects separated by a comma.

ReturnType

KWETuple

KWECheck.AddSubTupleFailed()

Lets you create a report hierarchy of the "failed" sub-tuples in the tree.

Signature

KWECheck.AddSubTupleFailed([Feature : Feature, ..]) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
FeatureInNoFeatureObject seen as "failed"

ReturnType

Boolean

Example

The example below is based on a product containing two representations containing holes. A rule base is located under the product. It contains a check.

Variable : P :VPMRepInstance
Body :
Let L(List)
Let H (Hole)
L = P.Query(“Hole”,””)
If (L.Size() >=1)
	ThisCheck.AddTupleFailed(P)
For H inside L
	ThisCheck.AddSubTupleFailed(H)

KWECheck.AddSubTupleFailedWithWeight()

KWECheck.AddSubTupleFailedWithWeight() -

Signature

KWECheck.AddSubTupleFailedWithWeight(Severity : Integer [, Feature : Feature, ..]) : Boolean

Arguments

NameInput/OutputRequired?TypeComment
SeverityInYesInteger-
FeatureInNoFeature-

ReturnType

Boolean

KWECheck.AddSubTupleSucceeded()

Lets you create a report hierarchy of the "succeeded" sub-tuples in the tree.

Signature

KWECheck.AddSubTupleSucceeded([Feature : Feature, ..]) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
FeatureInNoFeatureObject seen as "succeeded"

ReturnType

Boolean

Example

The example below is based on a product containing two representations and holes. A rule base is located under the product. It contains a check.

Variable : P :VPMRepInstance
Body :
Let L(List)
Let H (Hole)
L = P.Query(“Hole”,””)
If (L.Size() >=1)
	ThisCheck.AddTupleSucceeded(P)
For H inside L
	ThisCheck.AddSubTupleSucceeded(H)

KWECheck.AddTupleFailed()

Lets you fill in the list used to generate the report of failed checks.

Signature

KWECheck.AddTupleFailed([Feature: Feature, ..]) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
FeatureInNoFeature-

ReturnType

Boolean

Example

Variables : H:Hole;P:Part
					Body : if (H.Diameter > 5mm)
					ThisCheck > AddTupleFailed(H,P)

Note: Note that the tuple H,P is added to the report. Each call to this method adds a line to the report.

KWECheck.AddTupleFailedWithComment()

Lets you fill in the list used to generate the report of failed checks with a comment.

Signature

KWECheck.AddTupleFailedWithComment(Comment: Literal [, Feature: Feature, ..]) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
CommentInYesLiteralComment added to failed tuples
FeatureInNoFeatureFailed tuples (variable argument )

ReturnType

Boolean

Example

H:Hole;P:Part
					ThisCheck->AddTupleFailedWithComment(Hole and Pad are failed,H,P)

KWECheck.AddTupleFailedWithName()

Lets you fill in the list used to generate the report of failed checks with a comment and a name. You can change the tuple name.

Signature

KWECheck.AddTupleFailedWithName(Name: Literal, Comment: Literal [, Feature: Feature, ..]) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
NameInYesLiteralName displayed in the immersive report.
CommentInYesLiteralComment added to failed tuples.
FeatureInNoFeatureFailed tuples (variable argument ).

ReturnType

Boolean

Example

H:Hole;P:Part
					ThisCheck->AddTupleFailedWithName(Tuple Failed,Hole and Pad 
					is failed,H,P)

KWECheck.AddTupleFailedWithWeight()

KWECheck.AddTupleFailedWithWeight() -

Signature

KWECheck.AddTupleFailedWithWeight(Severity : Integer [, Feature : Feature, ..]) : Boolean

Arguments

NameInput/OutputRequired?TypeComment
SeverityInYesInteger-
FeatureInNoFeature-

ReturnType

Boolean

KWECheck.AddTupleSucceeded()

Lets you fill in the list used to generate the report of succeeded checks.

Signature

KWECheck.AddTupleSucceeded([Feature: Feature, ..]) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
FeatureInNoFeature-

ReturnType

Boolean

KWECheck.AddTupleSucceededWithComment()

Lets you fill in the list used to generate the report of succeeded checks with a comment.

Signature

KWECheck.AddTupleSucceededWithComment(Comment: Literal [, Feature: Feature, ..]) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
CommentInYesLiteralComment added to succeeded tuples.
FeatureInNoFeatureSucceeded tuples (variable argument ).

ReturnType

Boolean

Example

H:Hole;P:Part
					ThisCheck->AddTupleSucceededWithComment(Hole and Pad is failed,H,P)

KWECheck.AddTupleSucceededWithName()

Lets you fill the list used to generate the report of succeeded checks with a comment and a name. You can change the tuple name.

Signature

KWECheck.AddTupleSucceededWithName(Name: Literal, Comment: Literal [, Feature: Feature, ..]) : Boolean

Arguments

NameInput / OutputRequired?TypeComment
NameInYesLiteralName displayed in the immersive report.
CommentInYesLiteralComment added to succeeded tuples.
FeatureInNoFeatureSucceeded tuples (variable argument ).

ReturnType

Boolean

Example

H:Hole;P:Part
					ThisCheck->AddTupleSucceededWithName(Tuple Succeeded,Hole 
					and Pad is succeeded,H,P)

KWECheck.GetTuples()

KWECheck.GetTuples() -

Signature

KWECheck.GetTuples(Validity : Boolean) : List

Arguments

NameInput/OutputRequired?TypeComment
ValidityInYesBoolean-

ReturnType

List

KWEGenericRuleBaseComponent.GetRB()

KWEGenericRuleBaseComponent.GetRB()

Signature

KWEGenericRuleBaseComponent.GetRB() : KWERuleBase

ReturnType

KWERuleBase

KWEGenericRuleBaseComponent.GetRuleBase()

KWEGenericRuleBaseComponent.GetRuleBase()

Signature

KWEGenericRuleBaseComponent.GetRuleBase() : KWERuleBase

ReturnType

KWERuleBase

KWERuleBase.GetRootsOfFacts()

Returns the list of the roots used to compute the facts.

Signature

KWERuleBase.GetRootsOfFacts() : List

ReturnType

List

KWECheck.GetTuples()

Lets you retrieve tuples under a check.

Signature

KWECheck.GetTuples(Validity : Boolean) : List

Arguments

NameInput / OutputRequired?TypeComment
ValidityInYesBooleanTrue (succeded) or False (failed).

ReturnType

List

KWETuple.AddNewTuple()

Lets you add a subtuple under a tuple.

Signature

KWETuple.AddNewTuple(Validity : Boolean [, Object : Feature, ..]) : KWETuple

Arguments

NameInput / OutputRequired?TypeComment
ValidityInYesBooleanTrue (succeeded) and False (failed).
ObjectInNoFeatureObjects to insert (separated by a comma).

ReturnType

KWETuple

KWETuple.GetTuples()

KWETuple.GetTuples() -

Signature

KWETuple.GetTuples(Validity : Boolean) : List

Arguments

NameInput/OutputRequired?TypeComment
ValidityInYesBoolean-

ReturnType

List