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:

Automatic export of tool library into an external program


Recommended Posts

Hello guys.

I am developing a standalone feed-speed calculator in VB.NET

And i am going to introduce a feature to export tools from mastercam via ASCII export, calculating all the speeds in my program and then bringing them back.

That part is quite doable

 

1)I am wandering if it is possible to get that data directly and update tools automatically using some sort of chook?

 

2) Is this something worth perusing in your opinion or the standard ASCII method would do?

 

3) Is it at least possible to grab the tooldata from currently opened operation and then update all the rpm and feed fields?

Link to comment
Share on other sites
Is it at least possible to grab the tooldata from currently opened operation and then update all the rpm and feed fields?

 

You can easy scan thru the operations in the Toolpath Manager using a CHook or NETHook.

You can get the tool used by the operation,

but if you are just wanting to update -> FeedRate, PlungeRate and SpindleSpeed (RPM) in the operation,

you don;t even have to mess with the tool. Just update the operation.

 

Attached is a quick & dirty simple example X6 NETHook.

I scans thru the operations and displays a dialog for each, showing the FeedRate, PlungeRate and RPM it read in from the operation.

Click Cancel to just move onto the next operation.

Or make your desired changes and click Apply which will update the operation before moving onto the next op.

 

If you must use VB, here is a good C# <-> VB code converter => http://converter.telerik.com/

NETHook_ScanOperations.zip

  • Like 1
Link to comment
Share on other sites

Whoah. Thank you very much!

Unfortunately i tried to actually use that converter.....

Then after doing several fasepalms finally looked at the C# code and rewrote the interesting patrs to VB.NET manually.

 

I am was very rusty in C#, that's why i chose VB.NET as my platform. I gues i was wrong: Its a new language and alot different from VB6, also most of the docs are for c# ;(

 

Again thanks for your help, for anyone interested this was the part i needed:

Dim ops() As Mastercam.Database.Operation = Mastercam.Support.SearchManager.GetOperations()

For Each op As Mastercam.Database.Operation In ops

form.tbxOpComment.Text = op.Name

form.tbxPlungeRate.Text = op.PlungeRate

form.tbxFeedRate.Text = op.FeedRate

form.tbxSpindleSpeed.Text = op.SpindleSpeed

Next

 

my problem initially was that i tried to query tools but not ops.

 

BTW, i cant seem to make the resource file to work properly. I place FT file into c-hooks and it seems to work, but it does not load the icons and MCAM keeps bugging me with "Could Not Find any resources appropriate with specified culture of neutral culture.. blah blah "

Name of my project is "FSWizard_NET_CHOOK" and i modified the FT file as advised in..somwhere. but still doesnt work....

 

At any rate thanks. I will probably save tool data as XML and then read it with external app and then bring it back the same way. after all calcs are done.

Link to comment
Share on other sites
Find any resources appropriate with specified culture of neutral culture.. blah blah "

 

I did not add any TipString or small/large BMPs for icons to this project.

 

So if you did not add them to your project, that'll be a problem

or if you did add them, then probably the dnRES_NAME in your FT is not correct.

 

This specified the name of the Resources store within the DLL

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