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:

How to use undocumented "Setup Sheet program" feature?


Recommended Posts

Hello. I am looking for advice about how to use the "Other" item on the "Setup Sheet program" drop down menu:

 

wcjHJ6J.png

 

I assumed that this would make a call to an external program, but I can't seem to catch anything from it. Has anyone used this feature with software other than the .SET files and ActiveReports?

Link to comment
Share on other sites

You can select to use a different reporting executable in place of the default Activereports. This is for those of you that want to develop your own reporting application, Jim Varco at www.VarcoConsulting.com, has a nice example of a third party reporting application.

 

When you run setup sheet, tool list or nesting an XML file is created and this is the data source our Activereports uses, you can use the same file, append to the file or create your own entirely and set that as the data source in your reporting application, it's entirely up to you. The XML is always created in C:\Users\Public\Documents\shared mcam*\common\reports\XML with the most recent representing the last report or nest you ran.

 

 

Link to comment
Share on other sites

Thanks Mick. I don't see anything about that on his website. Maybe I'm missing something..

 

The XML only seems to be generated when ActiveReports is selected as the Setup Sheet program.

 

I want to take that XML file (or generate my own if I have to) and push it to my web based application. But I can't figure out how the Setup Sheet sheet feature in MasterCAM works. ie. what is happening when I click the "Setup Sheet..." menu item? Is it using a System.Diagnostic.Process to call an external program?

 

Going further, is trying to use the OTHER Setup Sheet program the wrong direction (what is it for then?)? Should I look into using the API and a NETHook? 

 

Thanks,

Dave

Link to comment
Share on other sites

Thanks Mick. I don't see anything about that on his website. Maybe I'm missing something..

 

I'll look into this as there might be something in the works in regards to information

 

The XML only seems to be generated when ActiveReports is selected as the Setup Sheet program.

 

I believe that is the workflow when generating a report from Mastercam

 

I want to take that XML file (or generate my own if I have to) and push it to my web based application. But I can't figure out how the Setup Sheet sheet feature in MasterCAM works. ie. what is happening when I click the "Setup Sheet..." menu item? Is it using a System.Diagnostic.Process to call an external program?

 

Going further, is trying to use the OTHER Setup Sheet program the wrong direction (what is it for then?)? Should I look into using the API and a NETHook? 

 

It does sound as if you don't need a report viewer just the data to feed your web service. I'll find out if there is a way to generate the xml data, in the meantime what I would do is whip up a NET-Hook that pushes the xml data to your web service, you would need to run a setup sheet or nest first the usual way to get the xml data generated but then you could post process with your NET-Hook. If you need any help with that let me know.

 

Thanks,

Dave

Link to comment
Share on other sites

You might look to the X+ setup sheets it pushes out a lot of information and might give you an idea how it pushes information into a HTML format or Excel format to use how ever you want.

 

I believe that's a C-Hook and he is generating his own data from the current file. I wrote a simple VBScript some years ago that did something similar albeit on a less grand scale. 

Link to comment
Share on other sites

Thanks Mick. I don't see anything about that on his website. Maybe I'm missing something..

 

 

Thanks,

Dave

 

Below is from the help file, not terribly helpful in regards to the external application option.

 

Setup sheet program

 

 

Indicates startup default program/method Mastercam uses to scan toolpath operations and compile a setup sheet. To change this setting, select another item from the drop-down list.

 

 

Available setup sheet methods are:

 

·         .SET File — Uses the .SET file template associated with the currently active post processor to create a setup sheet for the current Mastercam part file. The setup sheet created this way is an ASCII format DOC file that you can edit and print using a text or program editor.

 

·         ActiveReport — Uses XML data to create a setup sheet for the current Mastercam part file. The setup sheet created this way is a run-time based report that supports graphics, drafting notes, and barcodes. You can print and export to a variety of formats including PDF, HTML, RTF, and XLS. Output is fully customizable with ActiveReports Designer.

 

 

To use any other program/method (for example: MS Word, Mastercam Editor) that may be available to you, choose Other and use the Select an editor dialog box to navigate to and select the executable file for the desired application. The selected editor is added to the Setup sheet program drop-down list and, if saved, becomes the startup default.

Edited by Mick from CNC Software Inc.
Link to comment
Share on other sites

I believe that's a C-Hook and he is generating his own data from the current file. I wrote a simple VBScript some years ago that did something similar albeit on a less grand scale. 

 

Interesting. Yes, it is a CHook. I was able to take a peek using Dependency Walker and see which parts of the API they are calling. It appears they just circumvent the Setup Sheet menu items (but i could be wrong) and then build it all out using the API.

 

Below is from the help file, not terribly helpful in regards to the external application option.

 

To use any other program/method (for example: MS Word, Mastercam Editor) that may be available to you, choose Other and use the Select an editor dialog box to navigate to and select the executable file for the desired application. The selected editor is added to the Setup sheet program drop-down list and, if saved, becomes the startup default.

 

 

Thanks, I did look through it but there wasn't much there. I wrote a small program to check for arguments being passed and it doesn't seem to even be called (doesnt run):

static void Main(string[] args)
{
    try
    {
        string path = Environment.GetFolderPath(System.Environment.SpecialFolder.DesktopDirectory);
        path += "\\test\\text.txt";
        if (!System.IO.Directory.Exists(path))
        {
            System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(path));
        }
        System.IO.File.WriteAllText(@path, "program was called?");
        System.IO.File.AppendAllLines(@path, args);
    }
    catch (Exception e)
    {
        // cry
        System.IO.File.AppendText(String.Concat("ouch: ", e.Message));
    }
}
Link to comment
Share on other sites

I believe that's a C-Hook and he is generating his own data from the current file. I wrote a simple VBScript some years ago that did something similar albeit on a less grand scale. 

 

Mick it is, but when you dump it into Excel you can see all the variables that are output. That is a good way to reverse engineer something sometimes.

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