<!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>User Defined Operations</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_topic1" id="xps10_pagetitle">User Defined Operations</div>
      <hr noshade="true">
      <p class="para_topic">User Defined Operations are operations that use a processor other than NX to generate a tool path when a method of machining is required that cannot be accomplished by one of the standard NX CAM processors. This could be your own or third party code. In either event, the non-NX code is accessed through a user created NX User Function program that temporarily exits from NX, executes other code, and returns to NX.</p>
      <p class="para_topic">The following terms will help you understand User Defined Operations.</p>
      <p class="para_topic">Shared Library - A file which contains executable code and suitable bookkeeping information that allows that code to be found and executed. The building of a shared library is platform specific.</p>
      <p class="para_topic">Entry Point - A location in a shared library from which proper execution can occur. Entry points can be identified in a shared library by name. The function signature must be:</p>
      <p class="para_topic">extern DllExport void &lt;entry_point_name&gt;</p>
      <p class="para_topic">The Entry Point for User-Defined Operations is &quot;udop&quot;.</p>
      <p class="para_topic">For an example of a CAM User Defined Operation, see the UG/Open API Reference Online Help.</p>
      <p class="para_topic">CAM Exit - This is a User Function mechanism which allows you to execute any entry point in any shared library that exists during the running of a NX session.</p>
      <p class="para_topic">Environment Variable - A string which exists in a shell and which has a value. For example, on HP-UX under the Korn Shell you could create an environment variable suitable for a UDO as follows:</p>
      <p class="para_topic">export TEST_UDO=/cam/ncud/iuf.hpp.sl</p>
      <p class="para_topic">Do this in the shell in which the NX session will be run.</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"> The actual syntax of setting environment variables is platform specific.</p>
               </div>
            </td>
         </tr>
      </table>
      <p class="para_topic">The following describes the general procedure you must follow in order to create a User Defined Operation. The actual method is platform specific and will usually require systems administration skills.</p>
      <ul>
         <li>
            <p class="para_item">Create a shared library containing the code for creating the tool path. In general, you can follow the procedure for creating Internal User Functions to create this shared library.</p>
         </li>
         <li>
            <p class="para_item">For example assume the shared library is in the directory /cam/ncud with the name iuf.hpp.sl.</p>
         </li>
         <li>
            <p class="para_item">Create a suitable environment variable e.g., on HP-UX under Korn Shell:</p>
         </li>
      </ul>
      <p class="para_topic">export TEST_UDO=/cam/ncud/iuf.hpp.sl</p>
      <ul>
         <li>
            <p class="para_item">In the same shell that TEST_UDO is defined, enter NX Manufacturing and create a new User Defined Operation and enter TEST_UDO as the CAM Exit Name.</p>
         </li>
      </ul>
      <p class="para_topic">After you choose a (Mill, Lathe, WEDM) User type operation you can create a New operation, or Edit or Copy an existing operation.</p>
      <div class="title_division">Use Selected Tool</div>
      <p class="para_division">Toggle this option On if you want to use an NX tool in a milling User Defined Operation.</p>
      <p class="para_division">Select causes the Tool Selection dialog box to be displayed so that you can specify the tool.</p>
      <p class="para_division">Display causes the selected tool to be immediately displayed.</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">This option is not available in Thread Milling. In Thread Milling the tool must be defined inside the operation. You cannot use an existing tool. </p>
               </div>
            </td>
         </tr>
      </table>
      <div class="title_division">CAM Exit Name</div>
      <p class="para_division">This is the name of the environmental variable.</p>
      <div class="title_division">User Parameters</div>
      <p class="para_division">This option allows you to change options in your non-NX program before generating the operation (This is similar to setting or editing NX operation parameters before you Generate the NX operation). If you do not need to change options in your non-NX program, use the Generate option to immediately execute your program.</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"> When you use this option a different parameter is passed to the User Exit to distinguish this option from the Generate option.</p>
               </div>
            </td>
         </tr>
      </table>
      <div class="title_division">Tool Path</div>
      <p class="para_division">The Tool Path options are common to most operations. Refer the description of the Tool Path options in the Common Options section. </p>
   </body>
</html>