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:

Supressing Dialogs and Editor after posting from Net Hook


Recommended Posts

Developing a NET Hook in VB and I am having a problem with the Editor opening up after posting.

I have tried changing the settings in the post processing dialog screen to not edit for the NC file and NCI is disabled, tried also with NC disabled and No Edit. Same Result - Editor pops up.

Looked at values in mcamxm.config - they look correct for disabling Edit after Post

 

This Call has the parameters set to not Edit after Posting,looks like it is being ignored or overridden somewhere

Mastercam.Operations.OperationsManager.PostAllOperations(sOutputPath, False, False, False)

 

Any ideas? Is there something I a missing or not configuring correctly?

Link to comment
Share on other sites

What version of Mastercam?

Which editor?

Not that I know if it makes any difference, but it could!

 

I just tried this on X5.

The 'NC File' settings on the the Post Processing dialog are ->

Ask and Edit is checked.

And no editor appears after creating the NC file.

 

C# (I know that doesn't make any difference).

 

// Select the operations and post those ops...

string pathNC = @"c:\temp";

// Get ALL of the Operations in the file.

Mastercam.Database.Operation[] opList = Mastercam.Support.SearchManager.GetOperations();

// Post 'em!

OperationsManager.PostOperations(opList, pathNC, false, false, false);

 

...or...

// Post process the selected operation(s).

OperationsManager.PostAllOperations(pathNC, false, false, false);

Link to comment
Share on other sites

What version of Mastercam?

Which editor?

 

Mastercam X5 MU1

 

If I use Mastercam,Cimco or Notepad it opens up after Posting. If I use MCEdit which I do not have installed it exits ok and shuts down with no errors. I am going to try the net hooks on another machine with a clean install of mastercam and see if I can replicate the problem.

Link to comment
Share on other sites
  • 1 year later...

I know this is a bit of an old topic, but was a solution found? I'm having the exact same problem in X7 MU1.

 

The default 'NC File' settings on the the Post Processing dialog are -> Overwrite is checked and Edit is un-checked.

- If I post using the G1 and leave the defaults, nothing comes up. If I select Edit, the file opens in Notepad++.

- If I post from a NetHook written in C# with NETHook3_0 and the code below, the posted file opens in Notepad (the default windows one).

 

Operation[] AllOps;

AllOps = Mastercam.Support.SearchManager.GetOperations(false);

OperationsManager.PostOperations(AllOps, tempFolderRoot, false);

 

I have no clue what is going wrong. If I use this code on another system, it seem to work as expected. Are there any machine/control/post settings that force opening?

Link to comment
Share on other sites

Seems to be system dependent. When I post by clicking G1, it all works as expected. When I use this line of code on other systems, it works as expected. When I use this line of code on my computer or any computer running the nethook that was made on my computer, it launches in notepad, not the default editor

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