【文章內(nèi)容簡介】
o the expert rule to edit. Edit the rule in the panel which appears. or 2 Editing an Expert Rule Copyright DASSAULT SYSTEMES 2022 25 Select the node corresponding to the Expert rule to activate/inactivate (here its default name is ) Access the contextual menu (click on right mouse button) Set Activate or Inactivate option for the object 1 2 3 Activating / Inactivating an Expert Rule Copyright DASSAULT SYSTEMES 2022 26 Select the node corresponding to the Expert rule to delete (here its default name is ) Access the contextual menu (click on right mouse button) Select Delete 1 2 3 Deleting an Expert Rule Copyright DASSAULT SYSTEMES 2022 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 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 2022 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 displayed. Modify the default check name and ments 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 2022 29 Creating an Expert Check (2/3) KWE language 4 In the Check Editor displayed enter the expert check. For example, type H:Hole in the first window after the sign ?. Type = 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 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 = if ( = ) Then = 1 else = 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 2022 30 Creating an Expert Check (3/3) To avoid syntax errors in the text of the check we advise 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 of the check. Type the remaining text of the check. Copyright DASSAULT SYSTEMES 2022 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 Doubleclick 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 2022 32 Select the node corresponding to the Expert check to activate/inactivate (here its default name is ) Access the contextual menu (click on right mouse button) Set Activate or Inactivate option for the object 1 2 3 Activating / Inactivating an Expert Check Copyright DASSAULT SYSTEMES 2022 33 Select the node corresponding to the Expert check to delete (here its default name is ) Access the contextual menu (click on right mouse button) Select Delete 1 2 3 Deleting an Expert Check Copyright DASSAULT SYSTEMES 2022 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 Feature published elements. Creating the UDF instance type Creating Experts Rules or Expert Checks on UDF Copyright DASSAULT SYSTEMES 2022 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 Type 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 name 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 CATIA session. See Tools + Options + General + Parameters and Measure tab to enter the path of the .CATGscript. Creating the UDF Instance Type Copyright DASSAULT SYSTEMES 2022 36 1 Instantiate the UDF. 2 In the Knowledge Expert workbench, click the Expert Check icon and select the KWE language. Use the 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