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:

Change operation order NET-Hook C#


Recommended Posts

  • 3 months later...

Sorry to drag this up from the dead, but this is the exact piece of information I am looking to solve as well. Did you happen to be able to determine if this is possible via a c-hook instead of a a net-hook? The sorting methods provided in Mastercam do not meet our needs entirely but there is predefined logic that we can follow which would make something like this very nice to have.

  • Like 1
Link to comment
Share on other sites
  • 1 month later...

Sorry for delay, I was focused on other projects. This could still be useful.

 

 

Can we pass a Mastercam.Database.Operation entity for sourceOperation?

And an integer for tagetIndex.

 

Perhaps:

InsertAt(operation, targetIndex)

InsertBefore(operation, targetOperation)

InsertAfter(operation, targetOperation)

 

If that isn't possible, then perhaps move all ops with selected flag set:

insertSelectedAt(targetIndex)

 

 

 

If SearchManager.GetOperations always returns in same order as the toolpath manager list, that would be good in itself. Otherwise a way to get a list of operations in that order would be useful.

Link to comment
Share on other sites

>>Can we pass a Mastercam.Database.Operation entity for sourceOperation?

There currently is no support for “rearranging the order” (programmable drag ‘n drop) of the Operations in the Toolpath Manager tree using a NET-Hook.  I’ll add this to the wish list.

 

You’re not really talking about “sorting” here ->

(e.g. The “Sorting Options” available on Toolpath Manager’s right-click menu.)

I don’t see InsertAt or InsertSelectedAt as viable options. You would need to specify; before or after.

>>Perhaps:

>>InsertAt(operation, targetIndex)

>>InsertBefore(operation, targetOperation)

>>InsertAfter(operation, targetOperation)

>> If that isn't possible, then perhaps move all ops with selected flag set:

>>insertSelectedAt(targetIndex)

 

 >>If SearchManager.GetOperations always returns in same order as the toolpath manager list, that would be good in itself.

The list returned from SearchManager.GetOperations is not guaranteed to be in “Tree Order”.

>>Otherwise a way to get a list of operations in that order would be useful.

Yes, this would be required, and I’ll also add this capability to the NET-Hook API wish list.

  • Like 2
Link to comment
Share on other sites

Samuel,

 

What version of Mastercam are you running?  X9 or 2017

 

You you like to do some beta testing? ->

 

// Specify the insert (drop) location by an OpID of an operation in the tree,
// and move the list of operations (specified by their OpIDs) relative to the target.
DragAndDrop.AtOperation(targetOpId, moveOpIDs, DragAndDrop.Position.Before);

// Specify the insert (drop) location by a tree index position,
// and move the list of operations (specified by their OpIDs) relative to the target.
DragAndDrop.AtTreeIndex(ragetTreeIndex, moveOpIDs, DragAndDrop.Position.After); 

If so, email me at SDK <at> mastercam <dot> com

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