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:

Settings when opening a part


TERRYH
 Share

Recommended Posts

Is there a way you can change a setting so that when you open up someone elses part it does not change your settings, things like line width and wire frame color. we have a new guy who is learning and he has done the 3-axis work on a part and I have to finish the 5-axis stuff and it's just kind of annoying when it changes your settings to match what the part was saved to.

  • Like 1
Link to comment
Share on other sites

I wrote a chook to change the attribute settings when you run it, I built it for Mc2020 you only need to place the CustomAddIn.ft and CustomAddIn.dll files in your chooks folder. Download : https://github.com/PeterRussellEvans/CustomAddIn. Of course I will have to adjust the presets to your preference, just let me know if that works okay, later ill set it up to run everytime you load a new or existing file, for now it is chained to a button.

Link to comment
Share on other sites
1 hour ago, content creator said:

I wrote a chook to change the attribute settings when you run it, I built it for Mc2020 you only need to place the CustomAddIn.ft and CustomAddIn.dll files in your chooks folder. Download : https://github.com/PeterRussellEvans/CustomAddIn. Of course I will have to adjust the presets to your preference, just let me know if that works okay, later ill set it up to run everytime you load a new or existing file, for now it is chained to a button.

Thank you and where I wish 5th Axis was big enough to have a full time code guy. I got 100's of ideas to make Mastercam better. :thumbsup:

Link to comment
Share on other sites
4 minutes ago, 5th Axis CGI said:

Thank you and where I wish 5th Axis was big enough to have a full time code guy. I got 100's of ideas to make Mastercam better. :thumbsup:

Ron, 

if you have Idea's I would like to hear them, if it is within my abilities I will certainly add it to my to do list.

Link to comment
Share on other sites

In this case the code is as simple as this

#include "stdafx.h"
using Mastercam::App::NetHook3App;

public ref class MyEntryPoint : public NetHook3App
{
public: virtual Mastercam::App::Types::MCamReturn Run(int param) override {
	//start program//
	main_color = 1;
	main_attrib.filler = 1;
	main_attrib.pen = 1;
	main_attrib.pstyle = 1;
	main_attrib.style = 1;
	main_attrib.width = 1;
	//end program//
	return Mastercam::App::Types::MCamReturn::NoErrors;
};

};

 

Link to comment
Share on other sites
17 hours ago, DUM1 said:

THAT WOULD BE AWESOME ,  IN THE YEARS I'VE BEEN PROGRAMMING THAT HAS ALWAYS BEEN  PAIN 

It's a massive oversight that this functionality doesn't exist in Mastercam.

It is very  time consuming to reset all the attribute settings to the user

preferred parameters on each instance of a .mcx/.mcam file.

I would also add a function to change all the wireframe geometry attributes to the main attributes from a button.

Those two would work well together.

Link to comment
Share on other sites

Event Handling with C++/Cli -> GitHub (Mastercam 2018)(I will put the 2020 Later) . This is the converted project from cnc software by Mick George it showcases how the Mastercam event handler can run any function you want at any given mastercam event in the list, for example :

->when a new file is opened

->when an existing file is opened

->when the file is saved

->when the configuration is opened

->when the configuration is closed

There are a lot more....

Link to comment
Share on other sites

Hi guys,

I finished writing the code for the text file with the parameter, this way you can define your linestyles and colors easily.

The 2018 files are here -> Github

I will upgrade the 2020 version asap.

 

Link to comment
Share on other sites
On 2/27/2020 at 3:54 PM, TERRYH said:

Is there a way you can change a setting so that when you open up someone elses part it does not change your settings, things like line width and wire frame color. we have a new guy who is learning and he has done the 3-axis work on a part and I have to finish the 5-axis stuff and it's just kind of annoying when it changes your settings to match what the part was saved to.

Here is a chook to do what you asked. Mc2020 Link

Link to comment
Share on other sites
21 minutes ago, So not a Guru said:

Will the 2018 set work in 2019 as well?

Probably not, I will try to upgrade the 2019, but I don't have that version installed, I would need someone to check it

Link to comment
Share on other sites
Just now, content creator said:

Probably not, I will try to upgrade the 2019, but I don't have that version installed, I would need someone to check it

Not to dissuade you in any way.....but remember, you're going to be asked to maintain this through multiple versions forward and backwards....

For me, this is why I simply don't use things as such.....inevitably, at some point they cease....

I've been caught before and learned my lesson  :)

Kudos to you for working on and sharing your time and knowledge  :cheers:

Link to comment
Share on other sites

It will detect if the file containing the defaults is present and if it is load the settings, the settings are constantly loaded onrefresh, it could only be done on file load or file new,however on load the defaults don't seem to stick properly, which is why I made this

Link to comment
Share on other sites
1 hour ago, JParis said:

Not to dissuade you in any way.....but remember, you're going to be asked to maintain this through multiple versions forward and backwards....

For me, this is why I simply don't use things as such.....inevitably, at some point they cease....

I've been caught before and learned my lesson  :)

Kudos to you for working on and sharing your time and knowledge  :cheers:

It's okay Roger showed me some tricks to support multiple versions from one file. 

Link to comment
Share on other sites
2 hours ago, So not a Guru said:

No worries, we'll be moving to 2020 soon. No need for you to spend time on it.

It is no trouble, I think I have the SDK for 2019 and nethook_3 kicking around somewhere.

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