<!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>Overview</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_topic2" id="xps10_pagetitle">Overview</div>
      <hr noshade="true">
      <div class="title_division">Implementing callbacks and plug-ins</div>
      <table cellspacing="4" align="center">
         <tr valign="top">
            <td bgcolor="#f7f7f7" colspan="1" rowspan="1">
               <p class="para_td">Overview</p>
            </td>
            <td bgcolor="#f7f7f7" colspan="1" rowspan="1">
               <p class="para_td"><a class="links" href="javascript:void(0)" onclick="top.openFile('routingadmin/placepart_call.html');return(false);">Options</a></p>
            </td>
         </tr>
      </table><br><p class="para_division">The process of implementing a custom callback and a plug-in program is the same. In both cases an entry in the Application View File is necessary to define the program to Routing. The APV definition indicates the name of the shared library containing the executable code and the name of the function.</p>
      <p class="para_division">You must compile and link the executable. This process is no different than that for any NX Open program.&nbsp;Refer to <a class="links" href="javascript:void(0)" onclick="top.popUpPage('nxopen_gen_prog/index.html?goto=nxopen_gen_prog/nxopen_gen_prog_title.html&vars=-aux,-home','linkInter','menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,location=no,directories=no');return(false);">NX Open </a> for information on the methods available for compiling and linking.
      </p>
      <div class="title_division">Steps</div>
      <p class="para_division">There are four steps to implement a callback or plug-in:</p>
      <table bgcolor="#F0F0F0" cellpadding="2" cellspacing="4" width="95%" align="center">
         <colgroup span="1">
            <col align="left" span="1">
            <col span="1">
         </colgroup>
         <tr valign="top">
            <th bgcolor="#f9f9f9" colspan="1" rowspan="1">
               <p class="para_th">Write the program.</p>
            </th>
            <td bgcolor="#f9f9f9" colspan="1" rowspan="1">
               <p class="para_td">The writing of callback and plug-in programs is no different than writing a normal NX Open program. The methods and techniques available are documented in the NX Open topics and are not repeated here.</p>
               <p class="para_td">Examples are provided. &nbsp;The source file <code>ufd_route_sample_2.c</code> is an example of a callback program. &nbsp;The source file <code>ufd_route_sample_3.s</code> is an example of a plug-in 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">Some of the default <b class="uiTerm">Callback</b> and <b class="uiTerm">Plug-in</b> programs are provided as source code as well as executable libraries. This source code is found in the <code>ugroute_mech/plugins\source_code</code> folder. You can use these files as a starting point for your custom programs if you choose to. 
                           </p>
                        </div>
                     </td>
                  </tr>
               </table>
            </td>
         </tr>
         <tr valign="top">
            <th bgcolor="#f9f9f9" colspan="1" rowspan="1">
               <p class="para_th">Create the shared library file.</p>
            </th>
            <td bgcolor="#f9f9f9" colspan="1" rowspan="1">
               <p class="para_td">Refer to the NX Open programmers guide for instructions on compiling and linking.</p>
            </td>
         </tr>
         <tr valign="top">
            <th bgcolor="#f9f9f9" colspan="1" rowspan="1">
               <p class="para_th">Place shared library file in appropriate location.</p>
            </th>
            <td bgcolor="#f9f9f9" colspan="1" rowspan="1">
               <p class="para_td">Your shared library must be located where the system can find it. Typically this is any directory that is pointed to by the environment variable UGII_SHARE.</p>
            </td>
         </tr>
         <tr valign="top">
            <th bgcolor="#f9f9f9" colspan="1" rowspan="1">
               <p class="para_th">Define the program in the APV file.</p>
            </th>
            <td bgcolor="#f9f9f9" colspan="1" rowspan="1">
               <p class="para_td">The APV file must be modified to define your program. Please see the topic <a class="links" href="javascript:void(0)" onclick="top.openFile('routingadmin/xml_plugins.html');return(false);">XML APV Plug-ins</a> for further explanation.
               </p>
            </td>
         </tr>
      </table><br></body>
</html>
