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:

PMDc

Verified Members
  • Posts

    97
  • Joined

  • Last visited

Posts posted by PMDc

  1. You're trying to spool up an Application within a running NETHook?

    I'm surprised that anything (good) happens.

     

    No that is not my intent. Being a total newbie to application programming, I was able to create my form and use a "test" project to debug in VS Express 2010 and everything worked so I copied what worked for the test to the Mastercam template and it works one time.... still very much in the dark as to how to interface with Mastercam. So not to exhaust anyone's patience here, where do I find the basics of how this all works?

     

    I am slowly catching on to C# with online and professional help but have yet to uncover a step by step on simple NETHook creation.

     

    Thanks!

  2. I am getting the attached error message when I call my NETHook a second time. If I close Mastercam and reopen it will work one time and report this error when called any subsequent time.

     

    Below is the code I copy and pasted for my form. I am new to all of this so it appears that I am not closing my application properly. Any help is appreciated.

     

    Thanks!

     

     

    public override MCamReturn Run(int param)

    {

     

    MCamReturn result = MCamReturn.NoErrors;

     

    //DialogManager.YesNoCancel("System function called", "Run()");

     

     

    Application.EnableVisualStyles();

     

    Application.SetCompatibleTextRenderingDefault(false);

     

    Application.Run(new Form1());

     

    return result;

    }

    post-4253-0-83611600-1367347403_thumb.jpg

  3. Yes the buffer files are written after posting is complete. Now that you mention it, that will do it. Now if I wouldn't have given my customer the idea that there is a way to have fields to populate in MC for this data... *Sigh*.... It's all good, I'm learning something new.

     

    When I started this project I didn't think I'd be as deep as I currently am. I'm learning C# .NET language now with hopes that I won't be starting over when I want to write a CHook.

     

    Thanks!

  4. rocheey1,

     

    Thanks for the information! Excuse my ignorance because I am totally new to this; would it be possible to have the nethook write the project data to a memory buffer while in MC then any time an MC save is executed the buffer would populate the structured storage?

     

     

    As for the MP buffer file output, it worked great for exporting an ASCII text file until I hit the ceiling of my NC revision number counter needs to read the previous revision to increment. This works great when a file exists. However, when you post a file for the first time and the file does not exist the MP.exe reports an error for the missing file.

     

    Thanks,

    -Pat

  5. Like many who post here, I've always wanted to learn how to write CHooks (NETHooks) but thought it would be too complex. I have installed VS Express 2012, SDK from Microsoft, the examples and samples from Mastercam as well as some other information from the internet and this forum. I have searched through this forum and found a few things that are close to what I want to do but not quite.

     

    I am trying to create a place to store and output project information i.e. Customer, Part Number, Revision, Job Number, and NC revision number. I started by exhausting the buffer file option in MP.exe without acceptable results so I am looking for the path of least resistance to accomplish this. The Holy Grail would be to have an Operations Manager Tab with user customizable fields to enter this information then have the ability to output this data to NC as well as an Excel file for an MRP system to parse the data.

     

    I will be excited as groom on his honeymoon if I can get a NetHook to write a .csv or .xml file with the data then read it again for the NC revision level. I accomplished this with the MP.exe buffer file however, it kicked up an error that I couldn't remove; the first time the post runs, the output file doesn't exist for the previous revision level value call.

     

    From what I have read this is all doable in a CHook but I have not seen a solution that captures it.

     

    Questions:

    1.) Is there a Third-Party Developer that has done this already? If yes, is it customizable for file location, field labels, etc.?

    2.) If I decide to tackle this myself, will the software I listed above be enough to accomplish the tasks?

    3.) Where would you start?

     

    Thanks!

    -Pat

  6. On the tool branch of each of the operations parameters, check the box for "force tool change"

     

     

    Thanks for the reply. However this did not solve the problem. When I use a Mastercam supplied post it's there but the custom post I was given does not.

     

    I'll keep searching or revise a "good" post to get what I need.

     

     

    Thanks again.

  7. ***New Update***

     

    I found out why I had repeating tool numbers in the one file. I did not have a common NCI name for all ops so the report repeated it. I feel better now knowing why it happened.

     

    Of you who downloaded my tool list, have you made any improvements you'd like to share with the rest of us?

     

     

    Thanks, -Pat

  8. Update

     

    It turns out that my issue with repeating tools is isolated to a single MCX file. No clue why, but so far works fine on other files. It still lists the tools in operation order instead of numerically but I can live with that for now.

     

    Thanks to Headhunter for verifying and anyone else that played with it.

     

    -Pat

  9. I wonder then if you could modify the tool report to add in the info you need and just run a tool report instead? I'm sure there's a number of ways to do it. Just something to think about.

     

    I have done this but could not find a way to enter the header information. The labels are there but no data. Is there a way to add a query to populate these when running the report?

  10. Sorted Tool List...Sorted by what?

     

    You guys are aware that you can right-click in the Tool Manager choose Arrange Tools > by Number, by Type, by Name, or by Diameter and then right-click choose import/export - detailed report or report.

    This will give you a report in the way that you chose to arrange them. Is that what you guys are looking for?

     

    It is, however, I need the data in the header of the report and the tool manager does not have this option. So setup sheet via active reports is the only method I have found.

  11. You can call it in as sub report. You have to write in some custom code for it though. As far as I've been able to tell, that's the only way to make it happen.

     

    This is how I brought mine in....

     

     

    public void ActiveReport_ReportStart()

    {

    DataDynamics.ActiveReports.ActiveReport sbrpt = new

    DataDynamics.ActiveReports.ActiveReport();

    sbrpt.LoadLayout("C:\\Documents and Settings\\All Users\\Documents\\shared mcamx5\\common\\reports\\SST\\-tooldetail.rpx");

    this.tooldetail.Report = sbrpt;

    }

     

    Where are you placing this code to get it to work?

     

    Thanks, -Pat

  12. I am trying to get the Mill.set file to post the "Amount of stock to leave XY" and also "Tip Comp" values to my setup sheet.

     

    The mill.set file has a note that says to see 'Parameters Information.pdf' file from the Post Processor Reference Guide CD. Where can I get this file or CD for that matter?

     

    Thanks!

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