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:

UpdateToolSettings NET-Hook C#


Recommended Posts

The Operation.UpdateToolSettings method is not working how I would expect.

 

I assumed it would set the feeds and speed of the operation the match the tool parameters, like right clicking on a tool and choosing "Re-initialize feeds and speeds" in the operation parameters window. However I have not noticed anything change after calling that function on an operation.

 

Can you help me understand how this function works, and if it is working?

op.OperationTool = tool;
op.Commit();

op.UpdateToolSettings();

vs.

op.OperationTool = tool;

op.SpindleSpeed = tool.RPM;
op.FeedRate = tool.Feed;
op.PlungeRate = tool.PlungeFeed;
op.RetractRate = tool.RetractFeed;
op.Commit();

Mastercam X9 (18.0.18466.0)

Router

C# NET-Hook

Link to comment
Share on other sites
No, it's not quite exactly like -> choosing "Re-initialize feeds and speeds" in the operation parameters window

 

Unless I'm missing something, I would not expect this to really do anything.

 



op.OperationTool = tool;
op.Commit();
op.UpdateToolSettings();



You set the Tool into the Operation and Commit the Operation (all good).

The op.UpdateToolSettings() after is only going to push data from the Tool that is already in the Operation.

Link to comment
Share on other sites

It doesn't seem do anything for me, so that lines up :)

 

 

When I change the OperationTool of an op, I need to also explicitly update all feeds and speeds if I want them to match?

 

Right now my operation is created with a default tool. Then I programatically change the OperationTool, but the feeds and speeds still match the original tool.

 

It's fine if that is just the way it is - the following snippet does what I need. But I'm curious if there's a more elegant solution that I missed.

op.OperationTool = tool;

op.SpindleSpeed = tool.RPM;
op.FeedRate = tool.Feed;
op.PlungeRate = tool.PlungeFeed;
op.RetractRate = tool.RetractFeed;
op.Commit();
Updates an operation's tool-specific settings from it's OperationTool member's tool data

 

 

What type of tool-specific settings are updated in the operation?

Link to comment
Share on other sites

Forget about *UpdateToolSettings, as it’s not going to do anything useful for  here.

Even if it actually completely successfully…

It updates the tool info in the operation, except for these Operation values ->

LengthOffset

DiameterOffset

SpindleSpeed

FeedRate

PlungeRate

RetractRate

op.OperationTool = tool;
op.Commit();
bool result = op.UpdateToolSettings(); // Check the return of this method. It is true?

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