<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<!--
Copyright (c) 2006 UGS Corp.

All Rights Reserved.

This software and related documentation are proprietary to UGS Corp.
-->
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>ug_param_setRule()</title>
      <script language="javaScript">
        abridged="false";
        displayConditions=new Array();
      </script>
      <link type="text/css" href="../css/main_styles.css" rel="stylesheet">
   </head>
   <body class="bodydocs" onload="top.pageLoader()" bgcolor="#FFFFFF">
      <div class="title_topic3" id="xps10_pagetitle">ug_param_setRule()</div>
      <hr noshade="true">
      <p class="para_topic">This function sets the rule for a KF parameter. A KF parameter can be for instance a hole making operation parameter. It can be used to set the parameter values for KF created operations.</p>
      <p class="para_topic">Input:</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item">Any - Hostpointer of the operation.</p>
         </li>
         <li>
            <p class="para_item">String &ndash; Corresponding parameter name in index file. </p>
         </li>
         <li>
            <p class="para_item">String - Rule </p>
         </li>
      </ul>
      <div class="title_division">Example of ug_param_setRule()</div>
      <p class="para_division">$oper_name &lt;&lt; &ldquo;CSINK_SIMPLE_HOLE&rdquo;  </p>
      <p class="para_division">$oper_hostpointer &lt;&lt; ug_oper_create( &quot;hole_making&quot;,&quot;HOLE_MAKING&quot;,$oper_name,&quot;NONE&quot;,&quot;CSINK_METHOD&quot; ); </p>
      <p class="para_division"> # Set Cycle Parameters ug_param_setRule($oper_hostpointer,&quot;Cycle&quot;,&quot;{{~&quot;csink_dia~&quot;,0.000000},{~&quot;entrance_dia~&quot;, ug_param_askValue(~&quot;Tool Diameter~&quot;)},{~&quot;dwell~&quot;,~&quot;Off~&quot;},{~&quot;dwell_value~&quot;, },{~&quot;option~&quot;,False}}&quot;);  </p>
      <p class="para_division"># Set Depth Parameter ug_param_setRule($oper_hostpointer,&quot;USe Model Depth&quot;,&quot;TRUE&quot;);  </p>
      <p class="para_division"># Set Clearance Distance Parameter ug_param_setRule($oper_hostpointer,&quot;Clearance Distance&quot;,&quot;2&quot;);</p>
      <table border="0">
         <tr>
            <td valign="top" align="left"><img align="left" src="../graphics/note.gif" alt="Note" title="Note"></td>
            <td valign="bottom" align="left" width="100%">
               <div class="para_note">
                  <p class="para_note_body">A Parameter Index for the parameter to be set must exist in the param_indices.h file. The Parameter Index also must be exposed to KF otherwise the rule cannot be set. The function should only be used either from ug_oper_postCreate() or ug_fbm_postCreate() after an operation was created by ug_operCreate(). </p>
                  <p class="para_note_body">Use the ug_cam_askObjectOfInstance(self()) function to obtain the hostpointer from ug_oper_postCreate()</p>
               </div>
            </td>
         </tr>
      </table>
   </body>
</html>