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:

houes

Verified Members
  • Posts

    11
  • Joined

  • Last visited

Recent Profile Visitors

386 profile views

houes's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Roger, I now can debug my chook in visual studio. Here is another problem I met: When I try to generate toolpath in mastercam, I met the following error What does this mean? Thanks Guangyu
  2. Thank you Roger, I just found out that my c-hook program has some additional include directories and linker additional lib directories pointing to X6 sdk while I want it running in X7, I am correcting it... hope it works.
  3. Roger, The FT file for C-Hook in the \CHook should be correct, because when I run release MaterCAM X6, the toolbar got displayed (although the dlls for the CHook is a debug version), but when I switch to X7, it does not show up again. The FT file and C-Hook dll that I used in X6 and X7 are exactly the same . Is it possible that such difference is caused by the difference between X6 and X7? Thank you.
  4. Roger, I tried to run the debug mastercam x7 (I have x7 product and its sdk) both from visual studio and from shortcut, it works... with the only problem that I cannot find my c-hook under Settings->Customize->Category... Now leave that "cannot find c-hook problem" for latter, considering the different behaviors between x6 and x7, is it possible that my mastercam x6 and sdk install program have been damaged? If so where can I find the undamaged ones to download? Then for the "cannot find c-hook problem", how can I find where is wrong? Thank you!
  5. Yes, the X6 C-Hook SDK is MU2 and the X6 Product is MU2 (15.2.1.2) I installed them using files below(not using MU3): The service pack for Visual studio 2010 is the same: SP1 I tried removing .ft files from the CHooks folder, not work. However, I noticed one thing when I installed the mastercam x6, it asked me to installed 1) Microsoft Visual C++ 2010 Redistributable Package (x64) 2) Microsoft Visual C++ 2010 Redistributable Package (x86) But my system actually has these two packages, the install of these two then failed, and I continued installing... The second time I uninstalled my higher version of these two packages(10.0.40219) existing on my computer and let the mastercam install program install its own packages( turns out to be 10.0.30319) and tried run debug mastercam.exe, not work, it is still the same error message. Do you think I should uninstall the visual stuidio program and try again? Thank you.
  6. Hello, guys, Happy new year 2015 !!! I want to compile my c-hook program in a new computer. I encountered this problem when I transfered my c-hook code from one computer to a different computer. Everything works good in my old computer but not on my new computer. On the new computer, I failed to run MasterCAM in debug mode in 2 ways: 1) Using shortcut mastercam.exe; 2) Debug C-hook dll in visual studio when calling Mastercam.exe; They both gave me the following error message: Can you help me find the problem? My MasterCAM x6 is installed in C:\mcamx6 My sdk is installed in C:\mcamx6\sdk My computer is x64 platform I compiled my c-hook dll in x64 debug mode I also tried the shortcut method to call debug mastercam.exe on two other computers that have mastercam x6 installed and have x6 sdk. Both failed. I then guessed the problem is that I missed some important dlls in system32 folder which debug mastercam.exe needs but not installed on the new computers. What kind of dlls does mastercam needs additionally to enable its debug mode? Thank you! Guangyu ISU
  7. Roger, Thank you very much, Sorry to reply so late, it is at the end of my semester... I have sent my code to you email. Thanks again.
  8. Roger, Thanks very much. I checked mychook.FT file in the mcamx6\chooks\ folder, it defines the function and resource dll directory as "mcamx6\mychook\mychook.dll". I think that cause my debugging a different dll from my project debug dll. so I changed it to where my project locates. I did not use settings->Run User Application to load my chook dll because it shows this: I think this is because I specified several entry point functions in the .FT file. in the following form: FUNCTION CPP "OpenNewCAD" SBMP 18000 LBMP 18001 TIP 2 END_FUNCTION Now everything seems to be fine. I am using the C:\mcamx6\sdk\x64\debug\MasterCAM.exe as command, uses C:\mcamx6\ as work directory. I am debugging the mychook.dll in my E:\mychookproject\x64\debug\ folder. However, I come up with another problem. I can not open the .step file in my c-hook program in debug mode. I checked my program it seems when I use the MasterCAM SDK function: MC_BOOL status= DoFileOpen(file,false,false,0); The function return status=0; At this point, I think the file is not open/load successfully, thus when I later want to get the entities using get_ent(&ptr, &e_ptr, &entity, ALIVE_BIT, P_ID|L_ID|A_ID|S_ID|SURF_ID|SOLID_ID|SPLINE_ID|N_ID|W_ID|D_ID, &succf); the result succf=0; which means I did not get any entity from mastercam. Therefore, when I later want to convert the entities read from .step file to a stl file, the file formed results in 0 byte. code : and with this warning: The stl_file here is created but no data is written into it. I am confused because when I build the release mode of mychook.dll and run it using release Mastercam.exe, it works so well. I even try to make mastercam load the release version of mychook.dll and in command specify the release MasterCAM.exe, but still debug it in visual studio. Detail: in Visual Studio: Debugging->Command->C:\mcamx6\MasterCAM.exe in C:\mcamx6\chooks\mychook.ft : FUNC_DLL "E:\mychookproject\x64\release" RES_DLL "E:\mychookproject\x64\release" and then start debugging in Visual studio, and it turns out that the chook works out very well. I know this is a wrong way to debug, but it verifies in release mode, the file read works. Thanks again.
  9. Roger, Thanks very much for your reply. I double checked the bitness in Visual Studio and it is correct(x64). I did not found any ART.FT file in mcamx6\chooks, so I think it is OK. I tried creating cylinder surfaces and open igs models in mastercam in debug mode and it also works well. The exact version of my X6 is 15.0.4.3 The exact version of my SDK is 15.2.1.2 I realized the version dis-match so I install the mastercamx6-MU2-x64-web patch and now my version of X6 is 15.2.1.2, like below: I rebuild my project and try to debug again, I met the same error described above. However, I want to mention one important warning when I press Start Debugging(F5) in Visual studio, it says this: I am not pretty sure what this means. So I just press yes, and it continues opening MasterCAM. The other problem I have is that I wonder how the Visual studio know which dll I am debugging. Say my project locates at E:\mychookproject\ The mychook.dll I generated locates at E:\mychookproject\x64\Release and E:\mychookproject\x64\Debug\ I copy the mychook.dll from E:\mychookproject\x64\Release to C:\mcamx6\mychook\ Thus, when I open MasterCAM and uses my chook program, it uses the C:\mcamx6\mychook\mychook.dll In my opinion,when I am debugging the mychook.dll from my project, I assume the MasterCAM.exe should uses E:\mychookproject\x64\Debug\mychook.dll instead of C:\mcamx6\mychook\mychook.dll However when I am checking the Modules when I am debugging in Visual studio, it shows the following: And the warning says "the module did not load at the default load address" Therefore, I am wondering, if MasterCAM.exe load the mychook.dll in C:\mcamx6\mychook, it is totally wrong, the dll there is a release version. Meanwhile, I wonder what setting makes the MasterCAM.exe uses the Debug version of mychook.dll. Thank you very much. Guangyu
  10. Hello, I met a problem when I am trying to debug my c-hook program in MasterCAM. Currently, I am developing c-hook program for MasterCAM X6 in Visual Studio 2010. In the release configuration, everything goes well, I build the mychook.dll and it works well in MasterCAM. Now, I want to debug mychook.dll with MasterCAM running, which means I want to see how values changes in my source code in visual studio when I press buttons of mychook.dll in MasterCAM. I did what Roger said before: In visual studio, under my project. Configuration->Debug Configuration->Debugging->Command-> C:\mcamx6\sdk\x64\debug\Mastercam.exe Configuration->Debugging->Work Directory-> C:\mcamx6 (where I install mastercamx6) After these setup, I press Start Debugging(F5), MasterCAM opens successfully. However, when I try to using mychook button to open a step file(which works well in release mode), visual studio report a fatal error. like below: This error points to some mastercam database read/write code in my program. like below: This is very strange to me. Because it works well in the release mode, but here it fails. I am guessing that it uses some read/write dlls in the \sdk\x64\Debug folder instead of the dlls in my noraml running \mcamx6. Which means the sdk is causing the problem. Could it be that my sdk is not compatible with my mcamx6 ? Or could it be that I am not installing my sdk correctly?(Honestly, I just copy the sdk folder to any location in my computer, instead of installing it), Here is the "Error Reprot Dialog" when I open the mastercam in debug mode. I guess the problem would be the way that I deal with sdk, but I have no clue how can I fix this. Thanks in advance for your help. Guangyu ISU

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...