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:

Search the Community

Showing results for tags 'chook'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Mastercam Forums
    • Industrial Forum
    • Post Processor Development Forum
    • Educational Forum
    • Woodworking Forum
    • Machining, Tools, Cutting & Probing
    • 3D Printing


  • Mastercam Demo Software
  • Files Referenced in Books and Videos
    • Instructor Files
    • Mastercam X7
    • Mastercam X6
    • Mastercam X5
    • Mastercam X4
    • Mastercam X3
    • Mastercam X2
    • STEM
  • Free Book Samples
    • Mastercam 2020
    • Mastercam 2019
    • Mastercam 2018
    • Mastercam 2017
    • Mastercam X9
    • Mastercam X8
    • Mastercam X7
    • Mastercam X6
    • Mastercam X5
    • Mastercam X4
    • Mastercam X3
    • STEM Curriculum
  • Mastercam eBooks (PDF)
    • Mastercam 2023
    • Mastercam 2022
    • Mastercam 2021
    • Mastercam 2020
    • Mastercam 2019
    • Mastercam 2018
    • Mastercam 2017
    • Mastercam X9
    • Mastercam X8
    • Mastercam X7
    • Mastercam X6
    • Mastercam X5
    • Mastercam X4
  • Mastercam Documentation
    • Brochures
    • Press Releases
    • Tips & Guides
  • Tools
  • Post Processors
    • Post Processor 'How To' Info
    • Mpmaster (all versions)
    • Mplmaster (all versions)
    • Application Specific Posts
    • Educational Post Processors
    • Post Processor Request Forms
    • Post Processor Feature Checklist Forms

Product Groups

  • Sitewide Subscription
  • Books
    • Older Versions (No Demo Software)
  • eBooks (PDF)
    • Mastercam 2023
    • Older Versions (No Demo Software)
  • Multimedia
    • Older Versions (No Demo Software)
  • Clearance
  • eCourses
  • eCourses


  • General Mastercam
    • Hasp / Sim License Articles
    • Nethasp
  • Lathe
  • Toolpaths
    • FBM Drill
    • FBM Mill
    • Dynamic Milling
    • Contour
    • Drill
    • Pocket
    • Face
    • 2D Highspeed
    • Engraving
    • Surface Rough
    • Surface Finish
    • Surface High Speed
    • Curve 5 axis
    • Drill 5 Axis
    • Swarf 5 Axis
    • Multisurface 5 Axis
    • Flow 5 Axis
    • Rotary 4 Axis
    • Port 5 axis
    • Advanced Multiaxis
    • Circle Paths
    • Circle 5 Axis
  • Wire EDM
  • Art
  • Post-Processing
  • Editors & DNC
  • Add-ons + Chooks & Nethooks
  • Windows, PC & Hardware Troubleshooting
    • Windows Issues
    • Videocards
    • Network & Filesharing
  • Multiaxis
  • eBooks


  • Mastercam Training Solutions
  • eMastercam Community
  • Reseller Blog
  • Future of CNC Manufacturing Education
  • Mastercam Xtras
  • Latest News

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Mastercam SIM Number



Found 20 results

  1. Hello all, I am new to Mastercam. I just started learning mastercam 4th axis from the pdf of mastercam 5axis. THe tool in 2axis, follows the 2D path perfectly. But in 4th axis, the path of tool and the tool path does not match. I am attaching few screenshots, to understand this better. ss_1 : toolpath looks good. It's in the wireframe, proper place. ss_2 Going to verify now. ss_3 Is not starting where I wanted. ss_5 is completed pocket. ss_4 the axis rotated and now the pocket is in the place. What is happening here?
  2. I find the struct surf_hear s and s.type mean surface type, Does anyone knows how to use this variable? Is it possible to get the value of s.type to signify Plane, Cylinder, Cone, torus, Sphere, BSurface...?
  3. I am trying to write a chook to automatically select and set a chain to an operation. I believe the function I should be using for this is mc_op_getChains(). I need to input an entity pointer, the op index, and the chain. The op index is straight forward, I believe I understand the how to set and pass the chain into the function, what I'm having trouble with is the entity pointer. What entity do I need to pass into the function? In the Mastercam SDK the variable name is "solid" (shown in attached screenshot) which leads me to believe the function needs a solid. I don't understand why this function needs a solid, or any additional information at all. I feel as though I'm either trying to use the wrong function, or I'm completely misunderstanding how this function works. Any help is very much appreciated. I'm running Mastercam 2022 and Visual Studio Community 2019. If any additional information is needed please let me know.
  4. I'm just starting out with chooks. I've downloaded a couple of the example chooks off the mastercam third party developers page, and have gotten those built and working correctly. Now I'm trying to take the Create Drafting Notes example and add in my own code. Without my code the project builds and runs as intended. What I'm aiming to do, with import operations, is automatically pull an operation from another file. I thought this would be a good place to start given my inexperience. I've gotten to a point where the project builds just fine but when I debug it, as soon as it hits the import_operations an exception is thrown as shown. I placed a break point right before this line to check my values and it seems there may be something in the vector that was not initialized, as shown. However, now my lack of c++ experience is coming into effect because I have no idea if this is the actual problem, and if it is, I have no clue how to fix it. It's also completely possible this has nothing to do with the actual issue, in which case I really have no clue what's causing the problems. Any help is much appreciated, if more information is needed please let me know. I'm running Mastercam 2022 and Visual Studio 2019. Here is the code: void DemoImportOperations() { LPCTSTR fname = (_T ("C:\\Users\\jakelabrie\\Desktop\\junk.mcam")); p_3di pOrigin_pt = { 0.0, 0.0, 0.0 }; std::vector< long > op_ids{ 1 }; bool just_op = true; short get_groups = 0; bool calc_fs = false; bool assign_views = false; DUPTOOL_CHK duptool_chk; duptool_chk.mode = 0; bool expand_ops = false; bool succf = true; bool display = false; import_operations( fname, &pOrigin_pt, op_ids, just_op, get_groups, calc_fs, assign_views, duptool_chk, expand_ops, &succf, display); } and in the m_main function is this: DemoImportOperations();
  5. In my NetHook I need to compare tools from operations (Mastercam.Database.Tool) with tools from the tool library (CNC.Tool.Interop.TlTool). e.g. I want to compare the name -> OperationTool.Name = TlTool.Name so far good, but if I want to compare the diameter? OperationTool.Diameter = TlTool.? Gaugediameter? Gaugediameter always returns 0 for me and if I want to compare the ToolType? OperationTool.ToolTypeID can be compared, but in TlTool ToolTypeID is only a GUID. So how can I convert a TlTool to a Tool to compare parameters, or what are the comparable parameters? Thanks in advance for any help PS: I use Mastercam 2022
  6. It's a little time saver. Once launched, it will automatically regenrate any operation after editing the operation through the parameter dialog. Launch it again to stop the automatic regeneration. autoregen.zip Thanks to Michael Pfeil from InterCAM for this idea.
  7. Hi there, is there a quick and easy way to detect/determine the direction (cw or ccw) of a chained arc, depending of the active cplane with a chook? In this Moment I use Mastercam 2019 an Visual Studio 2017. Thank you for an answer an best wishes Karsten
  8. I'm using Mastercam 2018 and I am trying to rename the the NC name after merging two Mastercam files together in my Chook. I want to change the name to something different than the original MC file name. I cannot seem to figure out how to do this. I have tried renaming the NCI name but that doesn't change it. I don't see a way but I think there must be. Any help would be appreciated.
  9. Updated for X8; All previous templates have been removed. Note: In both cases you can install directly from within Visual Studio 2013 go to Tools -> Extensions and Updates and search on-line for Mastercam. Direct Downloads: C# Template VB.NET Template As always please direct any questions, requests, concerns to this thread,
  10. I'm trying to develop a NETHook to automate some tasks, but I've realized that NETHook library doesn't include some funcionalities. I've read in the forum that the method to deal with this problem is PInvoke the C++ functions from mi NET app, and I've read some documentation from the Microsoft Developer Network. My query is if, in order to provide a C++ function with a surf_type structure (defined in the C++ library of Mastercam), I have to create a VB structure with the whole group of attributes to marshal this type of data. Another thing is if in the MCcore.dll there exist the exported functions to use DLLImport with this library. Thanks in advance.
  11. Hi, I thought I will share this little chook. download It's included in X+ now (link) It imports SVG images. Mastercam 2018!
  12. Greetings all, find myself here often when looking for answers, first time posting. Questions follow my short rambling below. After altering many posts and cobbling together a functional aggregate head post I started looking into writing vbscripts. I accoplished what I set out to, digging through swaths of this site in particular to learn what was available to me. During that time it became more and more clear that vbscripts were on their way out, while Net-Hooks using c# or vb.net seem to be the way of the future. Throughout all these projects, documentation has been very sparse. Usually requiring 3rd party documents or in the case of writing Net-Hooks with c#, digging through the dll files included with the project to decode functionallity. I do not own my own mastercam license seat. As far as I can tell, all the real documentation sits behind the mastercam.com paywall. I have regiatered an accout, without linking a product, and still get re-routed when attempting to access any documentation. Questions: 1) Is there any alternative method to accessing the Net-Hook documentation? (Biggest sticking point is being unable to isolate drafting entities. I was able to accomplish this using a vbscript after some fiddling. Essentially ran the quickmaskall for drafting entities then searched for all selected entities) 2)Stumbled onto Mick's GitHub through my searching. Are the examples available there what falls under the open source license? (Cant imagine it is the NetHook Api.) 3) The most current project file available to download for visual studio says it has beem updated for X8, am i to understand we have not yet reached compatability with mc2017? Thank you all for your time. Any example projects would be most helpful and I am happy to return the favor.
  13. Good Afternoon All, I am looking for a c hook or information about the method functions etc... for creating large conic surface, the surfaces would be cones or cylinder 30m long. I am new to this forum.
  14. I'm dealing with the issues of large file sizes. I planed to use the CHook SectionNCI.DLL, but I am unable to find how to select Chooks within Mastercam for Solidworks 2017.( [Alt]+[C] does nothing ) So as an alternative I am trying to use the default Mastercam 2017. In MC2017 I am unable to find a way to import the sectioned NCI. Backin the days of X9 it was TOOLPATHS>IMPORT NCI. Where can I find this for Mastercam 2017? Trying to just stick with Mastercam for Solidworks 2017 How do I do any of this in that addon?
  15. I am trying to use a Chook to create a .NCI file for an existing operation in the Operations Manager. I am currently using the nci_manager function (defined in AssocHok_CH.h) with mode NCIMGR_POST_ONE. This is successfully creating a .NCI file for the operation, however the file is NOT identical to the .NCI file that is generated if I were to manually post the selected operation using the UI. The main difference is the CHook version is not using GCode 1000 (null tool change) between seperate passes in the toolpath. It is instead using GCode 1002, and reposting the same tool definition (GCode 20001 - 20009) over and over again for every new pass. I am trying to figure out how to get the CHook version to match the .NCI file that is produced manually. The only hint I found on how to use mode NCIMGR_POST_ONE is the comment: //create ascii nci for 1 operation - call post per cfg settings. I then ran the function GetCurrentCfgFilename() to find where the cfg file was located, and made sure that the Mill Post Processor file (.pst) defined there matched the active post Mastercam was using when manually outputting the .NCI file. Still had the same tooling GCode mismatch. Finally, I decided to remove all .pst files from my C-Drive to see what happens. I could no longer create the .NCI file using the Operations Manager because the active post no longer existed, BUT I could still run my CHook version and post the selected operation just like before. That seems to indicate that the CHook version was not actually using the post processor defined in the cfg file (because I removed it from my C-Drive), but I have no idea where to take it from here. Any advice on this would help out a lot. Thanks!
  16. Microsoft Windows 7 64 bit MasterCam X7 rc1?/Mu0? not sure what to call it- but NOT MU1 Visual Studio 2010 Pro SP1 Novice to C++ Trying to stumble through setting my first CHook up to run in debug mode. in my project Debugging properties, my "Command" is set to "C:\Program Files (x86)\mcamx7\sdk\DEBUG\Mastercam.exe", which is the install dir of the SDK. (BTW, tried changing this during install to %MCXINSTALLDIR% but it installed here anyway) "Command Arguments" [blank] "Working Directory" = "C:\Program Files\mcamx7\" //(%MCXINSTALLDIR%) "Attach" No "Debugger Type" Auto "Environment" [blank] "Merge Environment" Yes Env-Var "SDK_X7" =C:\Program Files (x86)\mcamx7\SDK (And I feel like I know SOMETHING if I don't include the 'SQL Debugging' param) When run from the IDE, i get the error "The application was unable to start correctly (0x000007b). Click OK to close the application" Tried making a desktop shortcut; Target="C:\Program Files (x86)\mcamx7\SDK\debug\Mastercam.exe" Start In: "C:\Program Files\mcamx7" When I launch this shortcut I get the same error as launching from the IDE When I directly click on : "C:\Program Files (x86)\mcamx7\sdk\DEBUG\Mastercam.exe", I get the error "The program can't start because IFStitch.dll is missing from your computer. Try reinstalling the program to fix this problem." "ifstitch.dll" is located in my MasterCam Install Dir, but not my SDK dir. When I copied "ifstitch.dll" to my /SDK/Debug dir, I got the same error as when run from the IDE. I'm not a teenager anymore, and don't have much hair left to pull out. Please let me continue to use a comb, and point me to what I've missed ? Thank you so much :/
  17. Digging through the forums I've learned that it's possible to automatically launch a c-hook on Mastercam startup by passing it as the first command line argument: "C:\Program Files\mcamx6\Mastercam.exe" C:\path\to\MyChook.dll Is it possible to access other command line parameters from a C-hook context? For example if I wanted to specify a config file for my c-hook on the command line: "C:\Program Files\mcamx6\Mastercam.exe" C:\path\to\MyChook.dll C:\path\to\MyConfig.txt I tried running Mastercam from a separate directory but it seems to change the CWD back to it's home in Program Files. Any advice?
  18. Hello to all, I try to get geometry from operations with a c-hook in X6 , in contour and pocket all is fine, I get the entities. But in drilloperations the chain_manager get no chains because there are points in the geometry and no chains I think. Can someone tell me how I can solve this? I use the following code, thank you for help, Karsten void OPDatenLesen() { CHAIN_ENT *chain_elem; CHAIN *act_chain; ent entity; chain_manager_info cmi; memset(&cmi,0,sizeof(chain_manager_info)); MC_BOOL succf; DB_LIST_ENT_PTR eptr; operation op; for (int i=1; i<5; i++) { op.op_idn = i; operation_manager(&op, OPMGR_GET, &eptr, &succf); if (succf) { if (op.db.select_flag == TRUE) { if (op.opcode == TP_DRILL) { cmi.op_idn = op.op_idn; cmi.mode = CHNMGR_GET; chain_manager(&cmi,0,&succf); // <- does not work in drill operations if (succf) { act_chain = cmi.chns; do { chain_elem=act_chain->start; do { get_ent_from_eptr(chain_elem->e_ptr,&entity); switch (entity.id) { case P_ID: { AfxMessageBox(_T("point")); break; } case A_ID: { AfxMessageBox(_T("arc")); break; } default: break; } chain_elem=(chain_elem->next); } while(chain_elem!=NULL); act_chain=(act_chain->next); } while(act_chain!=NULL); free_chains(&act_chain); } } else if (op.opcode == TP_CONTOUR || op.opcode == TP_POCKET) { cmi.op_idn = op.op_idn; cmi.mode = CHNMGR_GET; chain_manager(&cmi,0,&succf); if (succf) { act_chain = cmi.chns; do { chain_elem=act_chain->start; do { get_ent_from_eptr(chain_elem->e_ptr,&entity); switch (entity.id) { case A_ID: { AfxMessageBox(_T("arc")); break; } case L_ID: { AfxMessageBox(_T("line")); break; } case NB_ID: { AfxMessageBox(_T("spline")); break; } default: break; } chain_elem=(chain_elem->next); } while(chain_elem!=NULL); act_chain=(act_chain->next); } while(act_chain!=NULL); free_chains(&act_chain); } } } } } }
  19. Hello guys. I am developing a standalone feed-speed calculator in VB.NET And i am going to introduce a feature to export tools from mastercam via ASCII export, calculating all the speeds in my program and then bringing them back. That part is quite doable 1)I am wandering if it is possible to get that data directly and update tools automatically using some sort of chook? 2) Is this something worth perusing in your opinion or the standard ASCII method would do? 3) Is it at least possible to grab the tooldata from currently opened operation and then update all the rpm and feed fields?
  20. I've been out for about 5 years so bear with me. In x2 I had a Chook that I got from someone on here. I had a cam lift table with degrees and amount of lift off of the base circle. I remeber opening it up and it would ask for the excel file, the base circle diameter and if I wanted points or a spline. I can't for the life of me remeber what it was called and I am searching now but not having any luck can someone help me out? Thank you

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