Verified Members
  • Content count

  • Joined

  • Last visited

  • Days Won


byte last won the day on July 18

byte had the most liked content!

Community Reputation

410 Excellent

1 Follower

About byte

Profile Information

  • Gender
  • Interests


  • Location

Recent Profile Visitors

2,049 profile views
  1. byte

    DrawNciPoints Chook Mastercam 2021

    I now used it to create a filtering mechanism that shows only the points using the specified tool in a nesting operation, I also added the ability to store the points as mastercam entities. DrawNciPoints.dll DrawNciPoints.ft
  2. byte

    Server busy when closing verify

    I think so, we have a lot of network issues, this is one bug we frequently encounter, you can sometimes escape by hammering the switch to button, I haven't managee that once on the new version.
  3. Here is a more straightforward example. //.exe file code Header Files : //Pch.h #pragma once #include <windows.h> #include <iostream> //LoadDll.h #pragma once //the function definition #include "Pch.h" extern "C" typedef void(*functiontype)(); extern "C" void GetFunctionAddress(functiontype &function, const HINSTANCE &hGetProcIDDLL, const char * functiontypename, int &returnflag) { #pragma region GetFunctionAddress // resolve function address here function = (functiontype)GetProcAddress(hGetProcIDDLL, functiontypename); //handle errors function ? std::cout << "located the function named : " << functiontypename << std::endl : std::cout << "could not locate the function : " << functiontypename << std::endl; function ? returnflag = 0 : returnflag = 1; #pragma endregion } extern "C" void LoadDll(HINSTANCE &hGetProcIDDLL, const char * path, int &returnflag) { #pragma region LoadDll // resolve the library address here hGetProcIDDLL = LoadLibrary(path); //handle errors hGetProcIDDLL ? std::cout << "loaded the dynamic library : " << path << std::endl : std::cout << "could not load the dynamic library : " << path << std::endl; hGetProcIDDLL ? returnflag = 0 : returnflag = 1; #pragma endregion } //FileManager.h #pragma once #include "Pch.h" #include <vector> #include <atlstr.h> #ifdef UNICODE //Test to see if we're using wchar_ts or not. typedef std::wstring standardstring; #else typedef std::string standardstring; #endif //Get the current working directory std::string GetWorkingDir() { char path[MAX_PATH] = ""; GetCurrentDirectoryA(MAX_PATH, path); PathAddBackslashA(path); return path; } //Get a list of the files in the specified folder std::vector<standardstring> GetListOfFiles(standardstring path) { std::vector<standardstring>stringvector; WIN32_FIND_DATA fileData; memset(&fileData, 0, sizeof(WIN32_FIND_DATA)); CString string; string.Format(_T("%s\\*"), path.c_str()); HANDLE handle = FindFirstFile(string, &fileData); if (handle != INVALID_HANDLE_VALUE) { do { if (_tcscmp(fileData.cFileName, _T(".")) != 0 && // ignore "." and ".." _tcscmp(fileData.cFileName, _T("..")) != 0) { stringvector.push_back(fileData.cFileName); } } while (FindNextFile(handle, &fileData)); FindClose(handle); } return stringvector; } //Get the extension of the filename standardstring GetExtension(standardstring filename) { //store the position of last '.' in the file name int position = filename.find_last_of(_T(".")); if (position > 0) { //store the characters after the '.' from the file_name string standardstring result = filename.substr(position + 1); //print the result return result; } else { return ""; } } .cpp Files : //LoadDll.cpp #include "LoadDll.h" #include "FileManager.h" extern "C" int main() { //Get the current directory of our program auto workingdirectory = GetWorkingDir(); //Modify the path to point to a folder called Libraries //Libraries is located in the same folder as the program workingdirectory = workingdirectory + "Libraries/"; //Get a list of files from the Libraries folder auto files = GetListOfFiles(workingdirectory); //Loop through the list of files for (auto file : files) { //Get the extension from the filename auto extension = GetExtension(file); //check if the file is a dll if (extension == "dll") { //Modify the path to point to a .dll file. //The dll file is located in the folder called Libraries auto path = workingdirectory + file.c_str(); #pragma region Program Variables //the dll hinstance HINSTANCE hGetProcIDDLL; //the functions signature functiontype function; //the functions signature as a string auto functiontypename = "function"; //the program error code auto returnflag = 0; #pragma endregion //main program loop #pragma region Program Main Loop while (returnflag == 0) { //get the hinstance LoadDll(hGetProcIDDLL, path.c_str(), returnflag); //get the function address GetFunctionAddress(function, hGetProcIDDLL, functiontypename, returnflag); //call function function(); FreeLibrary(hGetProcIDDLL) ? std::cout << "Call to free Library succeeded" << std::endl : std::cout << "Call to free Library failed" << std::endl ; break; } #pragma endregion } } //windows message loop #pragma region Message Loop MSG Msg; while (GetMessage(&Msg, 0, 0, 0) > 0) { TranslateMessage(&Msg); DispatchMessage(&Msg); } #pragma endregion //return from program return 0; } //.dll file code: //library.cpp #include <iostream> extern "C" __declspec(dllexport) void function() { std::cout << "function executed!" << std::endl; }
  4. byte

    DrawNciPoints Chook Mastercam 2021

    With this chook you can view the toolpath points without the blue lines/arcs in the display (points only). The points are also visible in the users points style which could make the points easily visible. There is also a feature that each point is drawn in different color depending on if it is a drill point, rapid point,g1 or movement g2/g3 movement. Yellow == rapid, Green == g1, blue == g2/g3, red == drillpoint I used it yesterday to easily detect an operation with a low retract out of 100's of toolpaths.
  5. I thought it was a new "feature".
  6. byte


    It's easy to get confused when looking at that post code!
  7. This chook draws points used in the selected operation after the chook is run, run it again to disengage the function. Targeted toward 3axis mill operations, a different way to analyze your toolpath. DrawNciPoints.ft DrawNciPoints.dll
  8. ChangeAttributes.dll ChangeAttributes.FT ChangeAttributesStrings.txt
  9. byte

    Circle Mill End At Center?

    That's cool, I guess, more pre-processor directives for my chooks!!!
  10. Is this a new option on the lead in/out for circle mill? I look in my simulation and the cutter is going into the wall where the undercut is, Mastercam 2021.
  11. byte

    Titanium cutting

    They are, it would require 2 operations, the first a roughing pass until the depth of the tab height and the 2nd a 2d contour, that's how we do it
  12. byte

    Titanium cutting

    A roughing pass with osciliation/ramp could spare you some tool wear, ramp tabs would be ideal Double sided tape would let you skip the tabs
  13. byte

    Mastercam 2021 Zip2go not working
  14. byte

    maitanance fee

    Nah, Im on my smartphone most of the time, it gives me an unfair advantage!
  15. byte

    maitanance fee

    That's customer service. Sounds like a stand up guy.

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