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:

piaofcu

Verified Members
  • Posts

    24
  • Joined

  • Last visited

Recent Profile Visitors

573 profile views

piaofcu's Achievements

Apprentice

Apprentice (3/14)

  • Dedicated Rare
  • Collaborator Rare
  • First Post Rare
  • Conversation Starter Rare
  • Week One Done

Recent Badges

0

Reputation

  1. Thanks! TpOpList : 'RetrieveIDs' could serve the purpose. ( void RetrieveIDs(IDArray &idArray, bool IncludeSelectedOps, bool IncludeUnselectedOps);)
  2. Not very good at C++,is there anyone give me an example how to get all selected operations? <NetHook> Dim ops = SearchManager.GetOperations(True) For i As Integer = 0 To ops.Length - 1 '...... Next <Chook> auto opSelsCount = TpMainOpMgr.GetMainOpList().CountBySelectFlag(); auto opSels = TpMainOpMgr.GetMainOpList().OpBySelection(true); //point to the 1st operation, how do I get (or loop to) the 2nd, 3rd... selected operations? ??? Thanks!
  3. I found the problem: it seems that it is not possible to edit the tool in debug mode. In Release mode it's fine. TlToolMillPtr tlPtr=......; Cnc::Tool::GetToolSystem()->Edit(tlPtr);
  4. Hello, I am learning C++. I ran into a problem with a dummy function and couldn't solve it. Can someone give me some help? //Get List Of Tools std::vector<Cnc::Tool::TlAssemblyCPtr> toolassemblies = GetListOfTools(); if (!toolassemblies.empty()) { for (const auto toolasm : toolassemblies) { if (MessageBox(get_MainFrame()->GetSafeHwnd(), _T("Open Tool Dialog?"), _T("Tool"), MB_YESNOCANCEL) == IDYES) { //Cnc::Tool::IToolSystem* tl_sys; //error //Cnc::Tool::TlAssemblyPtr spResult; //error //Purpose: Open Edit Tool Dialog. Cnc::Tool::IToolSystem::EditAssemblyTool(???,true); //spResult: Cnc::Tool::TlAssemblyPtr //toolasm: Cnc::Tool::TlAssemblyCPtr } } } vs2019 + 2022. Thanks in advance!
  5. Thanks for the reply! Forgive my poor Chooks knowledge. After looking up, I think ”chain_manager“ doesn't seem to be working for the purpose. Maybe I'm missing something. chain_manager_info ChainManagerInfo; ChainManagerInfo.mode = CHNMGR_GET; ChainManagerInfo.op_idn = opID; chain_manager(&ChainManagerInfo, 0, &succf); "chns" doesn't seem to be useful either?
  6. Newbie questions: When I try to sort the chain?. [CODE] ...... if (op != NULL) { //short n; //n = op->u.prm_cntr.ch_sort.sort_method; //delete if (op->db.ent_count>=3) { op->u.prm_cntr.ch_sort.sort_method =2; // The wrong way? operation_manager(op, OPMGR_REWRITE, &dbPtr, &succf); ...... } } [/Code] ---------------------------------- Nothing happened... Thanks for any suggestions!
  7. As far as I know, starting from 2017, the file extension of all versions is “.mcam”(am i wrong?), so if I use Nethooks to access a certain file, is there a way to get the file version in advance?
  8. Maybe I should look for a way to install the SKD, because I can't view the information when I only have CHM. I want to see what updates are there. "The opcode" ( \interfaces\Core\ToolpathOperationCodes_CH.h)
  9. Windows10 . Maybe it was a problem when I downloaded it... Thank you very much, sir!
  10. When I install "Mastercam2020-sdk-web.exe", I get the following error: Error1606. Coutld not access network location I Google/Bing "Error1606. Coutld not access network location", and follow the found method to try, such as changing the registry, using the administrator... but nothing works. Crazy. (The installation log is included in the attachment.) Anyone have any suggestions? if someone sends a "CHookSDK.chm" to me, thank you very much too! (I only need to check some information,It is not necessary to install sdk) log.txt
  11. May I ask another question? Sir. GroupManager.GetAllGroups Method I can't understand how it works. How is it applied, can it output a list of groups?
  12. When i call the GetOpGroupDataInExternalFile method, it can get “Operation Comment”、“ID ”、“Tool” and “OpCode” (Operation types code? data type : Integer ). In the old version of C-HOOKS, it seems that I have seen header files about opcodes. It should be : TP_CONTOUR 1 //contourI TP_XFORM 4 // mirror, rotate, translate TP_MANUAL_ENTRY 17 //manual entry ... Is this possible if I want to get the toolpath'name(like contour, manual entry...) from OpCode? Or where can i get the information of OpCode (X9) ? I want to try to imitate "Import Toolpath Operations dialog box", It must be used in Toolpath Manager with right-click every time.I want to set the shortcut to enter, but I have not found a way. So I tried to write a NetHook , and support drag and drop mcx-9 files, which will greatly improve efficiency. But at present, this is very difficult: reading the toolpath parameters is one aspect, and it is not difficult to implement drag and drop in Windows Form, but it seems not easy to implement in mastercam. I am very sorry that I am not very proficient programming languages, so this is a big... challenge. Thank you for any suggestions.
  13. This is exactly what I want. And your reply made me learn a lot, thank you very much!
  14. With VBS, I can get OP's number form the specified mcx-9 file. [vbs code] ...... Dim fn,n fn="C:\Test\test.MCX-9" n=GetOperationCount(fn) ...... The focus is: I don't have to open the target file. (Or it opens in the background but does not affect my current file.) Now, with NEThook (X9) , It seems that I need open the file first, then i can get the Number of OP ? I have 2 questions: 1. Is there any way to get information without opening the target file? 2. Or, embed a "vbs file" into the dll ( nethook project ) and then call it directly with the "RunVBScript" Method. Can this be achieved? Thank you for your help.
  15. Roger, Thank you very much for your patience. About the previous question, I found a solution myself. I will come back to ask if there are other problems. Thanks again!

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