Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

CAM Disciple

Verified Members
  • Posts

    157
  • Joined

  • Last visited

Everything posted by CAM Disciple

  1. Out of frustration with the shapes.dll I created another sample call test.cpp I am pretty sure every setting is according to the Chook document. I had also included the two library file m_init.obj and m_ptrs.obj. However, I still have the Fatal Error: Program Entry Not found error. I really don't understand what went wrong. All I want to achieve is to create a simple Hello message box chook. I am not even have any fancy control or advance customizations. Attached is the code in test.cpp. Can anyone point me to the right path??? code: // test.cpp : Defines the initialization routines for the DLL. // #include "stdafx.h" extern "C" { #include "m_vars.h" #include "m_ncvars.h" #include "m_menu.h" #include "m_io.h" #include "m_dbm.h" #include "m_init.h" } #include "test.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif #include <stdio.h> #include <stdlib.h> ///////////////////////////////////////////////////////////////////////////// // CTestApp BEGIN_MESSAGE_MAP(CTestApp, CWinApp) //{{AFX_MSG_MAP(CTestApp) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code! //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CTestApp construction CTestApp::CTestApp() { // TODO: add construction code here, // Place all significant initialization in InitInstance } ///////////////////////////////////////////////////////////////////////////// // The one and only CTestApp object CTestApp theApp; static void chook_main() { message_box( "Your C-Hook Works!!", "C-Hook title"); } extern "C" void CH_ENTRY m_main (long *ptrs) { if (open_app(ptrs)) chook_main(); close_app (ptrs); }
  2. yes. I had verified that the _MSVC_ and MSWINDOWS is in the PreProcessor settings. Can you run the shapes.dll c-hook? Are you using MCAM 9.1 Sp2? The C-Hook document make a lot of reference to Mill Ver 8. I wonder whether that's a problem or not.
  3. yes, I had done that. I had included those two files in the project. How would you usually run and debug the dll?
  4. I had created a new project then copy and paste the text from the Word document. any clue?
  5. I am having problem running Shapes.dll from MasterCAM ver 9 sp2. I had copied and pasted all the source code into respective file and also created all the textbox, combo box and icons according to the Chook developer guide chapter 1. I had moved the #include down after the ifdef debug declaration in order to get rid of the undefined cos error. I had managed to get the shapes.dll compiled without error. When I try to run either debug or release version of shapes.dll, I get the "Program entry point not found error". What can I do to fix this problem and execute the shapes.dll chook? Thank you all for helping me
  6. I am using MPFAN generic fanuc post. I had defined 4 views for my parts. 0 degree, 90 degree, 180 degree, 270 degree. My rotation table cannot rotate 360 degree and I need better control of how it rotate. For example, if I want to move the table from 270 degree to 180 degree, under the absolute mode, the table will rotate clockwise 270 degree instead of anticlockwise 90 degree. I actually went into the post and force the absinc variable to 1 in the ppos_cax_lin2 block before outputting rotary axis. I don't think this is the correct way of doing this even though it works. Also, when I enabled the WCS output, it will post G54 for 0 degree, G55 for 90 degree, G56 for 180 degree and G57 for 270 degree view even though my work offset is defined as -1. The nci generated actually has the workofs variable change when the table is rotated. How can I make MasterCAM only generate different wcs if I change my workoffset to 1,2,3, and etc? Thanks in advance
  7. I would like to rotate my rotary axis in incremental mode. Currently, MasterCAM will set the NCI value in absolute mode resulting the rotary axis to have line like G0G90B90. Is there a setting in MasterCam to change the way rotary axis rotate?

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...