CATIA知识工程.ppt_第1页
CATIA知识工程.ppt_第2页
CATIA知识工程.ppt_第3页
CATIA知识工程.ppt_第4页
CATIA知识工程.ppt_第5页
已阅读5页,还剩51页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Copyright DASSAULT SYSTEMES 2002,1,Knowledge Expert,CATIA Training Foils,Version 5 Release 9June 2002 EDU-CAT-E-KWE-FF-V5R9,Copyright DASSAULT SYSTEMES 2002,2,Course Presentation,Objectives of the course In this course you will learn the functionalities of CATIA V5R8 Knowledge Expert : creation and

2、using of expert rules, expert checks, solving of rule bases, generation of check reports. For the creation of rules and check, you will learn how to use the Object Browser of Knowledge Expert. Targeted audience CATIA V5 users. Prerequisites CATIA V5 Basics.,0.5 day,Copyright DASSAULT SYSTEMES 2002,3

3、,Table of Contents (1/2),Workbench presentation. p.5 Accessing the workbench.p.6 User interface.p.7 User settings.p.8 Terminology.p.11 Creating a rule base and a rule set. p.13 Creating a rule base.p.14 Activating / inactivating a rule base.p.15 Creating a rule set.p.16 Activating / inactivating a r

4、ule set.p.18 Deleting a rule set.p.19 Creating an expert rule.p.20 Creating an expert rule.p.21 Editing an expert rule.p.24 Activating / inactivating an expert rule.p.25 Deleting an expert rule.p.26 Creating an expert check.p.27 Creating an expert check.p.28 Editing an expert check.p.31 Activating /

5、 inactivating an expert check.p.32 Deleting an expert check.p.33,Copyright DASSAULT SYSTEMES 2002,4,Table of Contents (2/2),Creating Expert Rules or Expert Checks on UDFp.34 Creating the UDF instance type. p.35 Creating Expert Rules or Expert Checks on UDF p.36 6.Navigating the object browser. p.37

6、Accessing the object browser.p.38 Using the object browser to create or edit expert rules or expert checks.p.39 7.Accessing the Expert Check/Rule in the Check/Rule bodyp.41 Accessing the Expert Check/Rule in the Check/Rule bodyp.42 8.Solving a rule base p.43 Solving a rule basep.44 9.Generating a ch

7、eck reportp.45 Setting a Rule Base optionsp.46 Generating a Check report p.48 10. Performing a Global Analysis of Checks p.49 Customizing checks Reports p.50 Running the checks Analysis p.51 Correcting the checks that failedp.52 11.Working with rule bases and catalogs.p.53 Storing a rule base in a c

8、atalog.p.54 Retrieving a rule base from a catalog.p.55,Copyright DASSAULT SYSTEMES 2002,5,Workbench Presentation,In this lesson, you will learn about the Knowledge Expert Workbench by Accessing the workbench User interface User settings Terminology,Copyright DASSAULT SYSTEMES 2002,6,Accessing the Wo

9、rkbench,Anywhere from 1- Start menu or 2- A CATIA document or 3- Workbench Icon,1-,2-,If the node Relations and the node Rule Base under it exist in the specification tree, double-click on Rule Base node,3-,See Tools + Customize + Start menu for the content of this Welcome box,Copyright DASSAULT SYS

10、TEMES 2002,7,User Interface : Knowledge Expert Toolbars and Icons,Rule Base node under Relations node,Rule Set node under Rule Base node Here : the Rule Set name is Hole_Checks,Expert Checks and/or Expert Rules nodes under Rule Set node,Expert Rule,Expert Check,Insert Rules,Report,Solve,Copyright DA

11、SSAULT SYSTEMES 2002,8,User Settings (1/3) : Knowledge General Settings,Select the corresponding option if you want the value of the parameter appear in the tree. the formula driving the parameter appear in the tree. to use measures in relations or user functions.,1,2,3,General / Parameters / Knowle

12、dge tab,Copyright DASSAULT SYSTEMES 2002,9,User Settings (2/3) : Knowledge in Part Settings,Select the corresponding option if you want the parameters of the part appear in the tree. the relations of the part appear in the tree.,Mechanical Design / Part Design / Display tab,1,2,Copyright DASSAULT SY

13、STEMES 2002,10,User Settings (3/3) : Knowledge in Product Settings,Select the corresponding option if you want the parameters of the product appear in the tree. the relations of the product appear in the tree.,Infrastructure/ Product Structure/ Product Structure tab,2,1,Copyright DASSAULT SYSTEMES 2

14、002,11,Terminology (1/2),A Relation is a generic name for knowledge objects : formulas, rules, checks, expert rules and checks and design tables. Relations used in Knowledge Expert workbench are hierarchical. A Rule Base is the object at the top of the hierarchy. It assembles sets of Rule objects. A

15、n empty Rule Base object is created automatically when you access the Knowledge Expert workbench. A Rule Set is an object which assembles a set of Expert Checks and/or Expert Rule. A Rule Set which will contain a check/rule is created during the creation of this check/rule. An Expert Check verifies

16、for any feature of a given type the satisfaction of a specified condition. Example : for any feature of type Hole, check if the diameter is equal to 10mm. The syntax is the following : H: Hole H.Diameter= 10mm. An Expert Check can be valid (green light) or invalid (red light). An Expert Rule verifie

17、s for any feature of a given type a specified condition and if the condition is satisfied, applies a set of actions on the feature . Example : for any feature of type Hole, check if the diameter is equal to 10mm. If it is, set the diameter to 20 mm. The syntax is the following : H: Hole if (H.Diamet

18、er= 10mm) H.Diameter= 20mm.,Copyright DASSAULT SYSTEMES 2002,12,Terminology (2/2),The Object Browser is a wizard that allows you to access the features, their attributes, operators and units that can be used in an expert rule or an expert check. The objects are displayed in the leftmost window of th

19、e Object Browser. Their attributes are displayed in the middle window of the Object Browser. The methods or properties available for the objects are displayed in rightmost window of the Object Browser. The signature (indicating the type of the arguments and the type of the result) of the methods is

20、displayed in the bottom window.,Copyright DASSAULT SYSTEMES 2002,13,Creating a Rule Base and a Rule Set,In this lesson, you will see how to create and manage Rule Base and Rule Set. These are two objects which are at the top of the hierarchy of Knowledge Expert objects . Creating a Rule Base Activat

21、ing a Rule Base Creating a Rule Set Activating a Rule Set Deleting a Rule Set,Copyright DASSAULT SYSTEMES 2002,14,If there is no rule base in your CATIA document, an empty rule base will be automatically created when you will access the Knowledge Expert workbench. You can access the workbench from 1

22、- Start menu or 2- Workbench Icon,1-,2-,See Tools + Customize + Start menu for the content of this Welcome box,Creating a Rule Base,Copyright DASSAULT SYSTEMES 2002,15,Select the Rule Base node Access the contextual menu (click on right mouse button) Set Activate or Inactivate option for the Rule Ba

23、se object,1,2,3,Activating / Inactivating a Rule Base,Copyright DASSAULT SYSTEMES 2002,16,The rule set creation is included in the expert rule/ check creation task. When you create an expert rule/ check, CATIA prompts you to select either a rule base or a rule set. Selecting a rule base creates a ru

24、le set and adds a rule/ check to this rule set. Selecting an already existing rule set creates a rule/ check in this rule set.,Creating a Rule Set (1/2),Copyright DASSAULT SYSTEMES 2002,17,You can create interactively Rule Sets by using the Rule Set function. It allows you to create hierarchy and ma

25、nage to logically structure the corporate knowledge base.,Creating a Rule Set (2/2),Copyright DASSAULT SYSTEMES 2002,18,Select the Rule Set node (here its default name is CATKWERuleSet.1) Access the contextual menu (click on right mouse button) Set Activate or Inactivate option for the RuleSet objec

26、t,1,2,3,Activating / Inactivating a Rule Set,Copyright DASSAULT SYSTEMES 2002,19,Select the Rule Set node (here its default name is CATKWERuleSet.1) Access the contextual menu (click on right mouse button) Select Delete,1,2,3,Deleting a Rule Set,Copyright DASSAULT SYSTEMES 2002,20,Creating an Expert

27、 Rule,In this lesson, you will see how to create and manage an Expert Rule. The Expert Rule is located under a Rule Set in the hierarchy of Knowledge Expert objects . Creating an Expert Rule Editing an Expert Rule Activating an Expert Rule Deleting an Expert Rule,Copyright DASSAULT SYSTEMES 2002,21,

28、1,Select the Rule Base or the Rule Set node,Click on the Expert Rule icon,2,3,A Rule Editor dialog box is displayed. Modify the default rule name and comments if need. Select your language : KWE Language (default language) or Visual Basic Language. Then Click on OK button,Creating an Expert Rule (1/

29、3),Copyright DASSAULT SYSTEMES 2002,22,Creating an Expert Rule (2/3),4,In the Rule Editor displayed enter the expert rule. For example, type H:Hole in the first window after the sign . Type if (H.Diameter = 5mm) H.Diameter = 10mm in the second window. Click on OK button. A rule is added to the rule

30、set in the specification tree. Note : The semantics of your expert rule is the following. For any feature of type Hole in the model, set its diameter to 10mm if the actual diameter is equal to 5mm.,KWE language,Visual Basic Language,4,In the Rule Editor enter the visual Basic Script in the main wind

31、ow. A rule is added to the rule set in the specification tree. Note : To specify that a check is valid or not, you must set the value attribute of the returnvalue object (1 if the check is valid 0 otherwise),Copyright DASSAULT SYSTEMES 2002,23,To avoid syntax errors in the text of the rule we advise

32、 you to use Object Browser. Once you are in the second window of the Rule Editor panel, type if (H. Click on the icon to access the Object Browser.,5,Find Hole in Part Design Features List and select Diameter in the list of Hole attributes. Click on Write icon to insert the attribute in the text of

33、the rule. Type the remaining text of the rule.,Creating an Expert Rule (3/3),Copyright DASSAULT SYSTEMES 2002,24,Select the node corresponding to the expert rule to edit. Access the contextual menu (click on right mouse button). Select Expert rule object - Definition in order to display the same pan

34、el than in (1).,1-,Double-click in the specification tree on the node corresponding to the expert rule to edit. Edit the rule in the panel which appears.,or,2-,Editing an Expert Rule,Copyright DASSAULT SYSTEMES 2002,25,Select the node corresponding to the Expert rule to activate/inactivate (here its

35、 default name is CATKWERule.1) Access the contextual menu (click on right mouse button) Set Activate or Inactivate option for the CATKWERule.1 object,1,2,3,Activating / Inactivating an Expert Rule,Copyright DASSAULT SYSTEMES 2002,26,Select the node corresponding to the Expert rule to delete (here it

36、s default name is CATKWERule.1) Access the contextual menu (click on right mouse button) Select Delete,1,2,3,Deleting an Expert Rule,Copyright DASSAULT SYSTEMES 2002,27,Creating an Expert Check,In this lesson, you will see how to create and manage an Expert Check. The Expert Check is located under a

37、 Rule Set in the hierarchy of Knowledge Expert objects . Creating an Expert Check Editing an Expert Check Activating an Expert Check Deleting an Expert Check,Copyright DASSAULT SYSTEMES 2002,28,1,Select the Rule Base or the Rule Set node,Click on the Expert Check icon,2,3,A Rule Editor dialog box is

38、 displayed. Modify the default check name and comments if need. Select your language : KWE Language (default language) or Visual Basic Language. Then click on OK button,Creating an Expert Check (1/3),Copyright DASSAULT SYSTEMES 2002,29,Creating an Expert Check (2/3),KWE language,4,In the Check Edito

39、r displayed enter the expert check. For example, type H:Hole in the first window after the sign . Type H.Diameter = 10mm in the second window. Click on OK button. A check is added to the rule base in the specification tree. Note : The semantics of your expert check is the following. For any feature

40、of type Hole in the model, verify if its diameter is equal to 10mm.,4,Visual Basic Language,In the condition Tab enter the visual Basic Script. For example type H:Hole in the first window after the sign . Type Dim diam As Length Set diam = H.Diameter if (diam.Value = 10.0 ) Then returnValue.Value =

41、1 else returnValue.Value = 0 end if,Note : To specify that a check is valid or not, you must set the value attribute of the returnvalue object (1 if the check is valid 0 otherwise),Copyright DASSAULT SYSTEMES 2002,30,Creating an Expert Check (3/3),To avoid syntax errors in the text of the check we a

42、dvise you to use Object Browser. Once you are in the second window of the Check Editor panel, type H. Click on the icon to access the Object Browser.,5,Find Hole in Part Design Features List and select Diameter in the list of Hole attributes. Click on Write icon to insert the attribute in the text o

43、f the check. Type the remaining text of the check.,Copyright DASSAULT SYSTEMES 2002,31,Select the node corresponding to the expert check to edit. Access the contextual menu (click on right mouse button). Select Expert check object - Definition in order to display the same panel than in (1).,1-,Doubl

44、e-click in the specification tree on the node corresponding to the expert check to edit. Edit the check in the panel which appears.,or,2-,Editing an Expert Check,Copyright DASSAULT SYSTEMES 2002,32,Select the node corresponding to the Expert check to activate/inactivate (here its default name is CAT

45、KWECheck.1) Access the contextual menu (click on right mouse button) Set Activate or Inactivate option for the CATKWECheck.1 object,1,2,3,Activating / Inactivating an Expert Check,Copyright DASSAULT SYSTEMES 2002,33,Select the node corresponding to the Expert check to delete (here its default name i

46、s CATKWECheck.1) Access the contextual menu (click on right mouse button) Select Delete,1,2,3,Deleting an Expert Check,Copyright DASSAULT SYSTEMES 2002,34,Creating Expert Rules or Expert Checks on UDF,In this lesson, you will see how to create and manage Expert Rules and Expert Checks on User Define

47、 Feature published elements. Creating the UDF instance type Creating Experts Rules or Expert Checks on UDF,Copyright DASSAULT SYSTEMES 2002,35,1,When creating the UDF, select the Type tab and in the Instance Type field, enter the name of the UDF type. To do so, enter a prefix in the first Instance T

48、ype field. This prefix should be made of at least 3 characters. It will enable the user to gather UDFs of the same kind by using their names. In the second field, enter the identifier of the UDF. Then the Manage type button is available.,2,Click on the Manage type button. Type is the Instance Type n

49、ame just created. User Type is the UDF Definition name. Super Type is the type from which the created type will inherit. Package is the workbench in which the created type will be displayed. File corresponds to the CATGscript file you want to create and that you will be able to use in your next CATI

50、A session.,See Tools + Options + General + Parameters and Measure tab to enter the path of the .CATGscript.,Creating the UDF Instance Type,Copyright DASSAULT SYSTEMES 2002,36,1,Instantiate the UDF.,2,In the Knowledge Expert workbench, click the Expert Check icon and select the KWE language. Use the

51、Type (“userfeature1” in this case) that you have just created to perform the Check. You can apply the Check or the Rule only on the UDF published elements (“dist” in this case). Then click OK to validate. If you the Object Browser, you will see appear in PartDesign this new type.,Creating Expert Rul

52、es or Expert Checks on UDF,Copyright DASSAULT SYSTEMES 2002,37,Navigating in the Object Browser,In this lesson, you will see how to access the Object Browser and how to use it to create an Expert Rule or an Expert Check. Accessing the Object Browser Using the Object Browser to create or edit an Expe

53、rt Rule or an Expert Check,Copyright DASSAULT SYSTEMES 2002,38,1,Double click in the tree on an Expert Rule or an Expert Check node to access its definition,Click on the Object Browser icon,2,3,The Object Browser wizard panel is displayed.,Accessing the Object Browser,Copyright DASSAULT SYSTEMES 200

54、2,39,Using the Object Browser to create or edit an Expert Rule or an Expert Check (1/2),In the leftmost window of the Object Browser select the category of the object you are interested in : Part Design or Shape Design feature, an Function or a Unit. In the middle window select the attribute of this

55、 feature you want to use. In the rightmost window select (if the window is not empty) the method or the property you want to apply on this attribute Example : Part Design Features - Pocket - EndLimit.,2,1,You can use the following buttons to get more information on the objects you manipulate : to go

56、 back or forward in the selection you are performing. to get the type object description. In our example : Diameter object with attribute Double. to get the parent feature and its attributes. In our example : the prototype of Hole feature is Mechanical Feature. to write down in the check or rule edi

57、tor the method or the attribute you have selected.,Copyright DASSAULT SYSTEMES 2002,40,Notice that : The signature of functions contains several fields Example : accessing Part Design Features - Pad- HasAttribute() we see the following syntax in the bottom of the Object Browser. MechanicalFeature :

58、HasAttribute( AttributeName : String ) : Boolean It means that the function HasAttribute( ) is defined for the class of objects of type MechanicalFeature, it takes one argument of type String and it returns a Boolean. When you indicate the attribute of the object, two syntaxes are possible : H.Diame

59、ter or HDiameter. When you use several objects in the expert rule or expert check, you must separate the declarations of types by semi-colons Example : H: Hole ; P: Pad ; S: Shell. You can see very often in the description of the syntax of functions the argument of type Holder. Here Holder is a kind of list. It contains several instances that can be accessed by the index thanks to the method GetInstanceMember(Holder, Index).,Using the Object Browser to create or edit an Expert Rule or an Expert Check (2/2),Copyright DASSA

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论