Roger Martin from CNC Software

CNC Software
  • Content count

  • Joined

  • Last visited

Community Reputation

63 Excellent


About Roger Martin from CNC Software

  • Rank
    Advanced Member

Recent Profile Visitors

2,768 profile views
  1. Roger Martin from CNC Software

    Can NETHook get an operation's cycle time?

    The GetMinimumZ() and GetMaximumZ() methods call the API's GetMaxAndMinZ method to find the Z data. And unfortunately, I see that the GetMaxAndMinZ method was broken until Mastercam 2019.
  2. Roger Martin from CNC Software

    Can NETHook get an operation's cycle time?

    Not with doing the calculation yourself. There are not separate incremental and absolute values stored in the operation's data.
  3. Roger Martin from CNC Software

    Can NETHook get an operation's cycle time?

    The value you get from a specific property in the LinkingParams of an operation, is just the "value". It is not an incremental/absolute value, it's just a "value" The true/false setting of the DepthIncremental (in the case of Depth) tells the system how to "look at" the (Depth) value. If "linking.DepthIncremental" = True Then it is incremental "from somewhere else", such as Top Of Stock. Experiment with a simple 2D-Contour path, changing just the DepthIncremental and see what the Depth value is in each case.
  4. Roger Martin from CNC Software

    wireframe geometry going to wrong level

    Sounds like the Entity Attributes Manager. Open the Attributes Manager and check the active settings. You don’t say which version of Mastercam you’re using, so how that’s done can differ. You can also get to those setting in Mastercam Configuration. Configuration – CAD (page). In the lower-right of this page are 'Entity Attribute Manager' settings.
  5. Roger Martin from CNC Software

    Can NETHook get an operation's cycle time?

    In the NET-Hook API for Mastercam 2020 there these CalcCycleTime methods - Operation.CalcCycleTime OperationsManager.CalcCycleTime
  6. Roger Martin from CNC Software

    MASTERCAM API'S (net-hooks using

    The version of Visual Studio used to build a NET-Hook doesn’t really matter. It's the "Target Framework" setting in the project that you're working with that can matter for .NET *This is not true for C-Hooks, which must be built using the exact same version (C++ compiler toolset in a specific version of VS) that was used to build the version of Mastercam it is to run in. Of course you’ll need to set the Reference to the proper NET-Hook API DLL that is in X6. You can try using VS-2017 this for X6 HET-Hook add-in. It may or may not help. But probably not because… If I recall correctly there was an issue in VB.NET itself back then. If you build your NET-Hook using C#, it will probably work in X6. This is a good VB to C# converter -
  7. Roger Martin from CNC Software

    MASTERCAM API'S (net-hooks using

    What version of Mastercam are you running?
  8. Roger Martin from CNC Software

    Post process from console

    Not exactly sure what you're asking, but I do know the answer is -> No. Mastercam needs to be running. Of course you can start Mastercam via a command line or "batch" type file. You can supply several options on the Command-Line that's supplied to the Mastercam.exe itself. Such the path\name of a .mcam file to be opened and the name of a C-Hook/NET-Hook add-in to be run after the file has been loaded. "C:\Program Files\Mcam2019\Mastercam.exe" "C:\Users\user1\Documents\my mcam2019\Parts\ToolTest.mcam" sortcircles.dll The add-in could .. Select All operations and then Post Process those operations. The add-in can also shut-down Mastercam when it's done. *If the Multi-Threading is enabled and some of those operations do get processed by that, this "shut down when done" can get a bit more complicated. If the add-in is a C-Hook it could disable Multi-Threading before commanding the Post Processing action.
  9. Roger Martin from CNC Software


    You've learned a lesson today. ;( The Windows file association stuff leaves a bit to be desired. For dealing with those, I use -> FileTypesMan utility
  10. Roger Martin from CNC Software

    Vb Script File List

    If you're not seeing the "Tip String Text" , there's something wrong with this Resource item. What appears between the "quotes" for the dnTip in the FT is the name of the String Resource item in here -> dnRES_NAME "UHM_Open.NETHook"
  11. Roger Martin from CNC Software

    Vb Script File List

    Check the Mastercam Log just after starting Mastercam. There will be complaints in there if Mastercam could not find the specified Resources in your DLL. If an Add-In is not showing up when you have an FT for it, that's that first place to look.
  12. Roger Martin from CNC Software

    Vb Script File List

    NO - Do not do that! You create your own separate .FT file for your C-Hook (or NET-Hook) Add-In. Something like this -> *Shown below is a sample FT for a C-Hook type Add-In. The .FT for a NET-Hook Add-In would differ in the fact that it would have a FUNCTION NET section where you declare the entry point method and the tip-string and icons resources and the addition of a dnRES_NAME line where you would specify the "name" of the Resources in the .NET Assembly where Mastercam is to look to find those "resource" items. # MyAwesomeAddIn.FT # # Application name should be uniquely named and be specific # to your company and/or product. # 3rd party add-ins should NOT make this "Mastercam"! APPLICATION "MyAwesomeAddIn_CP_PISTONS" # Point to the locations of your function and resource libraries. FUNC_DLL "chooks\MyAwesomeAddIn.dll" RES_DLL "chooks\MyAwesomeAddIn.dll" CATEGORY "CP PISTONS Add-Ins" # Specify the name of your entry point function, # the Resource IDs of the tool tip string and # the small and large icon images for your add-in. # The small icon must be a 16x16 pixel PNG image. # The large icon must be a 32x32 pixel PNG image. FUNCTION CPP "m_main" TIP 1 SPNG 18001 LPNG 18002 END_FUNCTION
  13. Roger Martin from CNC Software

    Vb Script File List

    What you're seeing in that list are special Add-Ins already "known" by Mastercam. You let Mastercam know about your Add-In with a (.FT) Function Table file. Now in Options, select in the Choose command from: Commands Not in the Ribbon -or- All Commands If your FT is proper, your add-in TipString will appear in the command list. If not, check the Mastercam Log as it will complain if something is incorrect in the .FT file.
  14. Roger Martin from CNC Software


    The ToolNetApi.dll is installed with Mastercam. You'll find it in the main Mastercam ("\Program Files\mcam2018" in this case) folder. You add a Reference to it in your NET-Hook project, just like you do for the std. NET-Hook API (NETHook3_0.dll) There's also the ToolNetApi.xml in there, so you have Intellisense . If you need details on how to do something specific, I should be able to round up some sample code using the TloolNetAPI. *Be sure to send your request to SDK <at> mastercam <dot> com
  15. Roger Martin from CNC Software


    We always need to know -> what version of Mastercam? The way to positively identity a Tool in the local part file's tool list is -> by its Slot number What types of Operations are you manipulating? The NET-Hook API itself does not support all operation types. But... There the the ToolNetAPI (starting in 2017) that can (should) be used to manipulate tools via a NET-Hook Add-In. You can submit your detailed info to SDK <at> mastercam <dot> com This forum is not sufficient fore doing detailed API support.

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