ex_mtm

<< Click to Display Table of Contents >>

Navigation:  User DLLs > Writing DLLs > Samples >

ex_mtm

The sample ex_mtm.dsp is a Visual C++ project file that provides empty skeleton functions for 2 user-dll moves, 2 user-dll tolerances, and 2 user-dll measures. This project serves as a template to begin writing your user-dll routines. By building the DLL module for this project and loading the resulting DLL file into 3DCS, the user-dll dialogs for moves, tolerances, and measures will each show the loaded routines in the user-routines pulldown. The code from the file userfunc.cpp for this project is shown below. The names that will appear in the pulldown for the user-dll move GUI's user-routines will be "userMoveName1" and "userMoveName2" since they are defined as such in the code below. The drop-downs in the user-dll tolerance and measure GUI's will also utilize the names defined in this file. You may modify these names as you see fit and begin filling in the functions accordingly.

 

// dcs headers

#include "dcs_defn.h"

#include "dcs_ufnc.h"

#include "userfunc.h"

 

/************************************************************/

/* Implement your move routines here */

/************************************************************/

 

// Move1

 

char dcsMoveName1[] = "userMoveName1";

 

char* dcsGetMoveFuncName1() { return dcsMoveName1;}

 

void userMoveFunc1(dcsDataPtr* pDataPtr)

{

wpMOVECAL_s* pUserMv = (wpMOVECAL_s*)pDataPtr;

if (pUserMv == wpNULL) return;

}

 

 

// Move2

 

char dcsMoveName2[] = "userMoveName2";

 

char* dcsGetMoveFuncName2() { return dcsMoveName2;}

 

void userMoveFunc2(dcsDataPtr* pDataPtr)

{

wpMOVECAL_s* pUserMv = (wpMOVECAL_s*)pDataPtr;

if (pUserMv == wpNULL) return;

}

 

 

/************************************************************/

/* Implement your tolerance routines here */

/************************************************************/

 

// Tolerance1

 

char dcsToleName1[] = "userToleName1";

 

char* dcsGetToleFuncName1() { return dcsToleName1;}

 

void userToleFunc1(dcsDataPtr* pDataPtr)

{

wpTOLECAL_s* pUserTl = (wpTOLECAL_s*)pDataPtr;

if (pUserTl == wpNULL) return;

}

 

 

// Tolerance2

 

char dcsToleName2[] = "userToleName2";

 

char* dcsGetToleFuncName2() { return dcsToleName2;}

 

void userToleFunc2(dcsDataPtr* pDataPtr)

{

wpTOLECAL_s* pUserTl = (wpTOLECAL_s*)pDataPtr;

if (pUserTl == wpNULL) return;

}

 

 

/************************************************************/

/* Implement your measure routines here */

/************************************************************/

 

// Measure1

 

char dcsMeasName1[] = "userMeasName1";

 

char* dcsGetMeasFuncName1() { return dcsMeasName1;}

 

void userMeasFunc1(dcsDataPtr* pDataPtr)

{

wpMEASCAL_s* pUserMs = (wpMEASCAL_s*)pDataPtr;

if (pUserMs == wpNULL) return;

}

 

 

// Measure2

 

char dcsMeasName2[] = "userMeasName2";

 

char* dcsGetMeasFuncName2() { return dcsMeasName2;}

 

void userMeasFunc2(dcsDataPtr* pDataPtr)

{

wpMEASCAL_s* pUserMs = (wpMEASCAL_s*)pDataPtr;

if (pUserMs == wpNULL) return;

}