<!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_askPrevOprValue()</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_askPrevOprValue()</div>
      <hr noshade="true">
      <p class="para_topic">This function asks for a certain parameter/attribute value of a previous operation. The operation must be within the same feature group. This is helpful when a current operation parameter is dependent on information of a previously applied operation.</p>
      <div class="title_division">Examples of How to Use ug_param_askPrevOprValue ()</div><pre class="indent">ug_param_askPrevOprValue(1,&quot;maximum_depth_distance&quot;)</pre><p class="para_division">This example returns depth value of the previous operation.</p><pre class="indent">ug_param_askPrevOprValue(1,&quot;Tool Diameter&quot;)</pre><p class="para_division">This example returns tool diameter of the previous operation.</p><pre class="indent">ug_param_askPrevOprValue(2,&quot;Suppressed&quot;)</pre><p class="para_division">This example returns TRUE if the 2nd last operation was suppressed by a KF Rule.</p>
      <div class="title_division">Examples for user defined KF Rules stored in ug_cam_func.dfa.</div><pre class="indent">ug_cam_drill_dia_base() 
@{
&nbsp;&nbsp;&nbsp;if ug_oper_hasFeatureAttribute(&quot;Major Diameter&quot;) = TRUE then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ug_oper_askFeatureValue(&quot;Major Diameter&quot;)
&nbsp;&nbsp;&nbsp;else if ug_oper_hasFeatureAttribute(&quot;C-Sink Diameter&quot;) = TRUE then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ug_oper_askFeatureValue(&quot;C-Sink Diameter&quot;)
&nbsp;&nbsp;&nbsp;else if ug_oper_hasFeatureAttribute(&quot;C-Bore Diameter&quot;) = TRUE then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ug_oper_askFeatureValue(&quot;C-Bore Diameter&quot;)
&nbsp;&nbsp;&nbsp;else if ug_oper_hasFeatureAttribute(&quot;CB_dia&quot;) = TRUE then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ug_oper_askFeatureValue(&quot;CB_dia&quot;)
&nbsp;&nbsp;&nbsp;else if ug_oper_hasFeatureAttribute(&quot;CS_dia&quot;) = TRUE then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ug_oper_askFeatureValue(&quot;CS_dia&quot;)
&nbsp;&nbsp;&nbsp;else if ug_oper_hasFeatureAttribute(&quot;Diameter&quot;) = TRUE then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ug_oper_askFeatureValue(&quot;Diameter&quot;)
&nbsp;&nbsp;&nbsp;else 0;
}Number;</pre><p class="para_division">This function returns the main diameter of a feature. It first asks if a certain diameter attribute exists and then returns the value of it. This function can be used to ask for the top diameter of base features and the UDFs provided by the system for Holemaking. </p>
      <div class="title_division">Examples for user defined KF Rules stored in ug_cam_func.dfa.</div><pre class="indent">Defun: ug_cam_tool_tap_drill_size()
@{ if ug_askPartUnits(&quot;&quot;) = Pounds_And_Inches then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# inch part &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# common unified threads
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ug_oper_askFeatureAttributeValue(&quot;Callout&quot;, String) = &quot;1/4-20_UNC&quot; then 0.203
else if ug_oper_askFeatureAttributeValue(&quot;Callout&quot;, String) = &quot;1/4-28_UNF&quot; then 0.221
else if ug_oper_askFeatureAttributeValue(&quot;Callout&quot;, String) = &quot;5/16-18_UNC&quot; then 0.25
else if ug_oper_askFeatureAttributeValue(&quot;Callout&quot;, String) = &quot;3/8-16_UNC&quot; then 0.312
else if ug_oper_askFeatureAttributeValue(&quot;Callout&quot;, String) = &quot;1/2-13_UNC&quot; then 0.422
else if ug_oper_askFeatureAttributeValue(&quot;Callout&quot;, String) = &quot;5/8-11_UNC&quot; then 0.5313
else if ug_oper_askFeatureAttributeValue(&quot;Callout&quot;, String) = &quot;3/4-10_UNC&quot; then 0.656
else if ug_oper_askFeatureAttributeValue(&quot;Callout&quot;, String) = &quot;1/8-NPT&quot; then 0.344 &nbsp;&nbsp;&nbsp;&nbsp;
else if ug_oper_askFeatureAttributeValue(&quot;Callout&quot;, String) = &quot;1/4-NPT&quot; then 0.437
# Tapped Drill Size is default if no Callout is specified above &nbsp;
else ug_oper_askFeatureAttributeValue(&quot;Tapped Drill Size&quot;, Number)
&nbsp;&nbsp;&nbsp;else
&nbsp;&nbsp;&nbsp;# metric part
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# common metric threads deviates from formula
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ug_oper_askFeatureAttributeValue(&quot;Callout&quot;, String) = &quot;M2.5_X_0.45&quot; then 2.1
else if ug_oper_askFeatureAttributeValue(&quot;Callout&quot;, String) = &quot;M8_X_1.25&quot; then 6.8
else if ug_oper_askFeatureAttributeValue(&quot;Callout&quot;, String) = &quot;M10_X_0.75&quot; then 9.2
else if ug_oper_askFeatureAttributeValue(&quot;Callout&quot;, String) = &quot;M10_X_1.25&quot; then 8.8
else if ug_oper_askFeatureAttributeValue(&quot;Callout&quot;, String) = &quot;M12_X_1.25&quot; then 10.8
else if ug_oper_askFeatureAttributeValue(&quot;Callout&quot;, String) = &quot;M12_X_1.75&quot; then 10.2
# Major Diameter - Pitch is default formula if no Callout is specified above
else ug_oper_askFeatureAttributeValue(&quot;Major Diameter&quot;, Number)-ug_oper_askFeatureAttributeValue(&quot;Pitch&quot;, Number);
}Number;</pre><p class="para_division">This function returns the required tap drill diameter for symbolic thread callouts. Instead of using a formula or the predefined tap drill size of the feature you can add your common callouts and specify the required drill size for the tool query. </p>
   </body>
</html>