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

Is there a way to refresh the level manager from a C# NETHook?

 

 

Could you be a bit more specific as to what you're trying to do?
 
You can manipulate the level data with a NETHook and the
Level Manager will display the "state" of the Level data.
 
You don't really tell the Level Manager to... "update your data display now"
Link to comment
Share on other sites

I wrote a C# NETHook that names levels per a company standard then moves Solids to one level, Surfaces to another, etc. This is needed because they receive 10 to 300 Catia single part files (imported using MoldPlus' translator) that need material size set before being programmed for production.

 

If the user has the level manager open when they start the NETHook, the Level Manager state does not update during or after the app closes. It displays the same state as before, however if you close it and reopen or right-click and refresh the list it shows the changes made.

 

One other thing that may be related is the user must Regenerate Display List for the graphics display to be correct as well.

 

Thanks for the help.

Link to comment
Share on other sites

You're running NETHook2? 

​What version of Mastercam are you running? 

 

I see that there is no way to tell the (modeless) Level Manager to "update your data display now" when it's up.

Currently you need to close/re-open the Level Manager dialog to get it to refresh the display of the new state of the level data that's been changed "behind its back".

I've logged a Defect for this issue in the NETHook API.

 

*Please email me, as I'd like to help you out here ->  SDK <at> mastercam <dot> com

Edited by Roger Martin from CNC Software
Link to comment
Share on other sites

I'm running X7. I started with NETHook3 in VS Express 2013 but I must have something hosed there because my Form wouldn't come up at all. I switched to VS Express 2012 and NETHook2 and it worked. I need to switch to 3 in 2012 to see if there is a problem there. Shouldn't be.

 

I threw this together really fast to get my customer some help with all the files they're processing and it will help them but I need to clean up the ugly code I have.

 

The refresh issues are not a big deal for them right now since the app is saving so much time per file plus they don't leave their level manager open anyway so it's a low priority, more of an OCD issue for me I guess. 

 

Thanks again for all the help Roger! Glad you logged this to be fixed, I've had a couple other people tell me their frustrations with them leaving the manager open while opening a new file and it displaying the previous file's levels until they close and reopen the manager or refresh it from the RMB menu.

Link to comment
Share on other sites
  • 3 weeks later...
  • 2 years later...

Roger,

 

I am having the same Level Manager refresh issue with 2017 and the Levels.MastercamInterop.RefreshLevelsManager() you set me up with is not recognized.

 

Can you help me?

 

Thanks,

-Pat

 

I away from my desk right now but I believe there is now a refresh or update method in the LevelsManager, taker a look in the object browser for the exact name.

  • Like 1
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...