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

I have made a new tool library with different tool numbers. But since we have many 1000 old programs, they all need to be renumbered. I wanted to write a script that queries me all the tools what new number they have. 

Since many operations have the cutting data adjusted separately I don't call "op.AssignMillToolBySlot(slot);" but set the number on the tool and still separately on the operation. The whole thing works, except for facing and slot milling. If I call there "op.Commit(false);" the geometry is discarded, also with true the same. Why?

Or how does it work differently? Can I also change the tool number without recalculating the operation? That would be much better.

Thanks for all ideas
Use Mastercam 2023

The actual code is attached

Renumberator.csx

Link to comment
Share on other sites
  • 7 months later...
On 7/11/2023 at 2:17 PM, MKTech said:

I have made a new tool library with different tool numbers. But since we have many 1000 old programs, they all need to be renumbered. I wanted to write a script that queries me all the tools what new number they have. 

Since many operations have the cutting data adjusted separately I don't call "op.AssignMillToolBySlot(slot);" but set the number on the tool and still separately on the operation. The whole thing works, except for facing and slot milling. If I call there "op.Commit(false);" the geometry is discarded, also with true the same. Why?

Or how does it work differently? Can I also change the tool number without recalculating the operation? That would be much better.

Thanks for all ideas
Use Mastercam 2023

The actual code is attached

Renumberator.csx 1.51 kB · 10 downloads

Those operations are not supported by the api, there is also a bug with commit, the chook api is far better suited for these tasks,

for most tasks involving toolpaths the nethook api is not suitable

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