|
This task explains how to handle features that are in error. In the
scenario described below, you are going to open a .CATPart file that is
made up of 2 lines and a datum point. This point will be the intersection
of the lines if they intersect, or the origin if they do not. To do so, you
are going to create a rule. |
|
The use of geometrical operators to value geometry in relations may
lead to update errors in the created features. If you value a datum point
with the result of the intersection of 2 lines, these 2 lines may not
intersect and the point is therefore in error.
Do not catch evaluation errors which is available by
selecting the relation in the specification tree and selecting the
Properties command enables you:
- To create features in error
- To know (through an error message) if a feature is in error and
- To make changes (or not) in case of errors.
|
|
Note that this error handling is only available for GSD features. |
|
-
Open the
KwrErrorHandling.CATPart file.
-
From the Start > Knowledgeware menu, access
the Knowledge Advisor workbench.
-
Click the Rule icon ()
to create a rule that will react to the fact that the datum point is the
intersection of the 2 lines if they intersect or the origin if they do
not.
-
In the Rule Editor, enter the following body:
let x(Point)
x =intersect(`Geometrical Set.1\Line.1`
,`Geometrical Set.1\Line.2`
)
if (x.Error==true)
`Geometrical Set.1\Point.5`
= point(0mm,0mm,0mm)
else
`Geometrical Set.1\Point.5`
= x |
|
Note that Japanese users must type
the following rule body: |
|
-
Click OK when done. The intersect operator
launches an error message if the intersection is empty.
-
Right-click the rule in the specification tree and
select Properties.
|
|
-
Check the Do not catch evaluation errors check
box and click OK when done. This way, the evaluation of the
rule will be forced even if an update error occurs.
|
|
|