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:

A simple question about NET-Hook 2.0


Recommended Posts

I'm working with NETHook2_0.dll.

I tried VB2005 and VB2008.

 

I have the following codes to retrieve the group list and operation list in the operation Manager.

code:

 

Dim group_list() as Mastercam.Support.Group

group_list = Mastercam.Support.SearchManager.GetGroups()

 

Dim op_list as Mastercam.Database.Operation

op_list = Mastercam.Support.SearchManager.GetOperations()


for group_list, I got nothing.

for op_list, I can retrieve the operations, except the user-defined operation such as Manual Entry.

 

My questions are:

1. how to retrieve the tool-path group list?

2. how to retrieve the user-defined operations?

 

Thanks in advance.

Link to comment
Share on other sites

This code will iterate all operations, let me know if thats what you are looking for. I'll take a look at groups next.

 

code:

Imports Mastercam.App

Imports Mastercam.App.Types

Imports Mastercam.BasicGeometry

Imports Mastercam.Database.Types

Imports Mastercam.Database

Imports Mastercam.IO

Imports Mastercam.IO.Types

Imports Mastercam.Math

Imports Mastercam.Support

 

 

For Each op As Mastercam.Database.Operation In SearchManager.GetOperations()

 

Select Case op.Type

 

Case OperationType.BlockDrill

DialogManager.OK("BlockDrill:GroupNumber = " & _

op.GroupNumber.ToString() + " OperationID = " + _

op.GetOperationID().ToString(), "")

 

Case OperationType.CircleMill

DialogManager.OK("CircleMill:GroupNumber = " & _

op.GroupNumber.ToString() + " OperationID = " + _

op.GetOperationID().ToString(), "")

 

Case OperationType.Contour

DialogManager.OK("Contour:GroupNumber = " & _

op.GroupNumber.ToString() + " OperationID = " + _

op.GetOperationID().ToString(), "")

 

Case OperationType.Drill

DialogManager.OK("Drill:GroupNumber = " & _

op.GroupNumber.ToString() + " OperationID = " + _

op.GetOperationID().ToString(), "")

 

Case OperationType.Engrave

DialogManager.OK("Engrave:GroupNumber = " & _

op.GroupNumber.ToString() + " OperationID = " + _

op.GetOperationID().ToString(), "")

 

Case OperationType.HelixBore

DialogManager.OK("HelixBore:GroupNumber = " & _

op.GroupNumber.ToString() + " OperationID = " + _

op.GetOperationID().ToString(), "")

 

Case OperationType.Nesting

DialogManager.OK("Nesting:GroupNumber = " & _

op.GroupNumber.ToString() + " OperationID = " + _

op.GetOperationID().ToString(), "")

 

Case OperationType.OnionSkinning

DialogManager.OK("OnionSkinning:GroupNumber = " & _

op.GroupNumber.ToString() + " OperationID = " + _

op.GetOperationID().ToString(), "")

 

Case OperationType.Pocket

DialogManager.OK("Pocket:GroupNumber = " & _

op.GroupNumber.ToString() + " OperationID = " + _

op.GetOperationID().ToString(), "")

 

Case OperationType.Undefined

DialogManager.OK("Undefined:GroupNumber = " & _

op.GroupNumber.ToString() + " OperationID = " + _

op.GetOperationID().ToString(), "")

 

End Select

Next

Link to comment
Share on other sites

Thank you for your reply.

 

For the operation list, I still have one question.

If I use the following codes to get the operation list, the returned operations don't contain some operations such as "Manual Entry".

code:

 For Each op As Mastercam.Database.Operation In SearchManager.GetOperations() 

I would like to know if I can get all the operations in the operation manager.

 

Further more, how can I retrieve the VIEW name if I know the view number.

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