Search the Community
Showing results for tags 'import operations'.
-
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();
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.