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:

Net-Hook: Retrieve the stock model origin position


Recommended Posts

7 minutes ago, LMVUICHARD said:

Hello,

One of our customers ask us to have a small application to automatically create lines on the edges of a stock model m

LMVUICHARD,

If your customer right clicks on a stock model operation, there is a convert to pmesh function available, the resulting pmesh can be used with the functions ->

Curve All Edges or Silhouette boundary without any API Support.

Link to comment
Share on other sites

Sorry, i've send my message before finishing it...

One of our customers ask us to have a small application to automatically create lines on the edges of a stock model manually defined, like this:

image.png.d83b646bdba3b1a934fc888ccd67978a.png

With OperationsManager.JobSetupStockOrigin, and OperationsManager.JobSetupStockSize that's easy to done

But one problem remain:

image.png.8cef34f4cd8a45218472a3ca902493f9.png

if operator change the stock model origin, how it will be possible to retrieve it?

Thanks in advance...

Link to comment
Share on other sites
1 minute ago, LMVUICHARD said:

Sorry, i've send my message before finishing it...

One of our customers ask us to have a small application to automatically create lines on the edges of a stock model manually defined, like this:

image.png.d83b646bdba3b1a934fc888ccd67978a.png

With OperationsManager.JobSetupStockOrigin, and OperationsManager.JobSetupStockSize that's easy to done

But one problem remain:

image.png.8cef34f4cd8a45218472a3ca902493f9.png

if operator change the stock model origin, how it will be possible to retrieve it?

Thanks in advance...

There is a fix for this in Mastercam 2021.

I would recommend requesting the groupStockAddIn from the sdk team.

The Mastercam::Support::MillStockData class has the info you need.

the StockOriginLocation  holds one of the types listed in -> Mastercam::Support::StockOriginPosition

Example -> Top_LowerLeft;

Link to comment
Share on other sites
/*Writes the Origin Position of the Stock Used in the Active Machine Group to the Event Logger (MC_LOGR)*/
var data = Mastercam.Support.MillStock.GetStockData();

Mastercam.IO.EventManager.LogEvent(Mastercam.IO.Types.MessageSeverityType.InformationalMessage,"",data.StockOriginLocation.ToString());

 

Link to comment
Share on other sites
4 minutes ago, LMVUICHARD said:

Wow, I hadn't seen these new improvement!!

Thank you very munch for your incredibly quick answer!.. Efficient and very helpfull!!!

Thanks again!

Cool, glad it worked out for you!

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