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:

Setup Sheet from chook


Recommended Posts

We are running Mastercam x9 in a headless environment using a chook that exports our features to Mastercam, generates and posts the operations.  From this chook, I would also like to generate the default setup sheet that is built into Mastercam and save the pdf.  After looking through the SDK headers I have found only a few routines for setup images and a define for POST_MODE_SETUP_SHEET, but nothing that seems to do what I want.

 

Is it possible to generate the setup sheet via chook, and if so, how do I do this?

 

Link to comment
Share on other sites

Hi calsev,

 

All setup sheets use XML for their datasource that is created when you select the Setup Sheet context menu from the operations manager. Currently there is no way to generate this output via an API command, name the file or set its location, we do have stories to address these issues but not currently.

 

Having said that I have written a number of NET-Hooks that merges external data into the XML file, I have also written my own XML file for use with ATP reports so there are options.

 

When the Setup Sheet menu is clicked Mastercam simply shells out the to the ActiveReports viewer located in your Mastercam program files folder under common\reports and passes the name of the rpx file (report) to use and the name and location of the xml file as its datasource.

 

 

 

 

 

 

 

We are running Mastercam x9 in a headless environment using a chook that exports our features to Mastercam, generates and posts the operations.  From this chook, I would also like to generate the default setup sheet that is built into Mastercam and save the pdf.  After looking through the SDK headers I have found only a few routines for setup images and a define for POST_MODE_SETUP_SHEET, but nothing that seems to do what I want.
 
Is it possible to generate the setup sheet via chook, and if so, how do I do this?

 

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

We have developed our own HTML setup sheet, but one issue remaining is grabbing operation and tool images.  The functions in SetupSheet_CH.h seem to make this simple.

 

WriteOperationImage();

WriteMillToolImage();

 

However, exports for these functions do not appear in a dump of the DLLs in both the SDK and application directories.  Are these defined somewhere that I am missing?

 

Barring success finding the easy-mode functions above, I am able to set the view and grab screenshots.  Three issues remain even with this workaround.

 

1. Grabbing high-resolution shots of just the view port.  Roger hints at a solution in the link above, but the answer was not posted on the forum.

 

2. Even a high-resolution shot of only the graphics view still grabs the entire view port.  It would be awesome to get a view of the paths for a single operation, as is generated in the [MC shared]\common\reports\IMG folder when the setup sheet is created from the GUI.

 

3. I have yet to find a way to grab mill tool images (I have not found anything analogous to MakeLatheToolBmp() for mill tools)

 

Any guidance on the best way to generate these images is greatly appreciated.

Link to comment
Share on other sites

Though I'm not really familiar with these (2) functions, I do see that they are exported (MCCore.LIB) in the Mastercam 2017 C-Hook SDK.

WriteOperationImage();

WriteMillToolImage();

 

 

Shoot me an email -> SDK <at> mastercam <dot> com

 

There is a way to run the "reports" style SetupSheet without displaying the dialog.

Edited by Roger Martin from CNC Software
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...