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:

Recommended Posts

Yes, I want used vb.net2008 creat net c-hook for mastercam X5,But where can i find or download net c-hook sdk or vb.net 2008 template for mastercam X5.
 I find mastercam net c-hook template in microsoft website, but the vb.net version too higher.

Link to comment
Share on other sites
  • 2 weeks later...
On ‎5‎/‎3‎/‎2017 at 8:13 PM, Lee1 said:

Yes, I want used vb.net2008 creat net c-hook for mastercam X5,But where can i find or download net c-hook sdk or vb.net 2008 template for mastercam X5.
 I find mastercam net c-hook template in microsoft website, but the vb.net version too higher.

There is no SDK install required for .NET NET-Hooks, just add a reference to the NETHook DLL located in your Mastercam install folder. As for templates, I never created one for VS2008.

 

I would install the free VS 2017 Community Edition which is essentially a Professional Edition and will be more than adequate for NET-Hooks. If you do and when you create a new Vb.NET NET-Hook project just remove the existing NET-Hook DLL reference from the project and add a new reference pointing to your Mastercam X5 location.

Edited by Mick George
Link to comment
Share on other sites
On 2017/5/16 at 8:23 AM, Mick George said:

There is no SDK install required for .NET NET-Hooks, just add a reference to the NETHook DLL located in your Mastercam install folder. As for templates, I never created one for VS2008.

 

I would install the free VS 2017 Community Edition which is essentially a Professional Edition and will be more than adequate for NET-Hooks. If you do and when you create a new Vb.NET NET-Hook project just remove the existing NET-Hook DLL reference from the project and add a new reference pointing to your Mastercam X5 location.

vb.net 2008

rename select operation  nci name by tool number , i can count select operation number, but rename nci name fail, how can i do it rename operation nci name buy tool number.

 below is my .net code

     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

  Dim intCount As Integer
        intCount = 0

        For Each op As Mastercam.Database.Operation In SearchManager.GetOperations(True)
            intCount = intCount + 1
            op.NCIName = Microsoft.VisualBasic.ChrW(op.OperationTool.Number)

        Next

DialogManager.OK("Count Select Operation Number:" & CStr(intCount) , "Information")

End Sub

Link to comment
Share on other sites

You have changed the something in the .NET "Operation" object.

You have to tell it if you wish to "commit" the change(s) made to the Operation into Mastercam's database.

For Each op As Mastercam.Database.Operation In SearchManager.GetOperations(True)
  intCount = intCount + 1
  op.NCIName = Microsoft.VisualBasic.ChrW(op.OperationTool.Number)
  op.Commit(False) ' commit the change
 Next

 

Note that the NET-Hook API does not recognize every type of tool operation in Mastercam.

Do not attempt to .Commit "unknown" Operation types.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

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