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:
You mean you want a plane which is your actual wcs but rotated -152° on its y axis ?
Could you post a file with your plane already created to be sure ?
Yes there is a command to remove the text.
You need to add commands to a custom menu or you can use command finder in home ribbon to call commands and double click to execute them.
Documentation is here but you need to login on official website (www.mastercam.com) to have access. There you can download Hook examples (for VB/Csharp/SDK Chooks). You also can make scripts directly in Mastercam with NET-Scripting.
With visual studio you can download templates for Mastercam hook.
@Jobnt I don't know what's going on and I wonder what file or dependency can't be loaded. Check there is 'C:\Program Files\Mastercam 2020\Mastercam\NETHook3_0.dll' but no reason it's not there.
I can't reproduce on my seat, i'll try on another one.
You also could try to install 2023 even if you don't use it.
@Jobnt Here is another release to try ^^
ideally, you should put files in "Program Files\Mastercam 2020\Mastercam\chooks" but it should work in any folder (with a limited feature)
CommentToolNumberToolpath-V2020-dotNET4.zip
@ikertx0 This was pretty straight forward. Here a Nethook which will change program numbers and rename nci from a start number.
RenameToolpathByProgNumber.zip
@Jobnt I rebuilt it referencing .NetV4.0. Hope this will help. Unzip, unblock files and move them where you need it.
CommentToolNumberToolpath-V2020-dotNET4.zip
@Jobnt I just installed and tried on 2020 and it works OK here (from Program files/Mastercam/CHooks or another folder).
You may have a R/W access rights issue or perhaps you should check .NET framework is up to date. This NEThook is referencing V4.8.
I send another .zip file specific for 2020, .dll is the same but i changed .ft file. If you are finally allowed to install it in programs/Mastercam/CHooks folder you will be able to set it in QAT/RMB/Ribbon.
CommentToolNumberToolpath-V2020.zip
@Jobnt You talked about script so i made it that way^^
In your ribbon (Home tab) you should find a command to launch NETscript editor. It looks like a notepad, just open file i sent then click execute. Editor can be used to export to a .dll file and .ft file if you want to execute this script with one click from your QAT/RMB/Ribbon.
Actually, this is a net-script which is replacing VBS now. If you struggle with it and feel more confortable with a .dll/.ft I will make them.
@Jobnt NET script seems to work.
I joined .csx file at the end of my post. You can export it with Mastercam script editor to add it to your QAT/Ribbon if you need it.
// settings
string prefix = "- T"; // String to add with tool number
bool used = false; // True will only modify selected toopath
// Get all operations from toolpath manager
Operation[] toolpaths = SearchManager.GetOperations(used);
// Iterate operations
foreach (Operation op in toolpaths)
{
try
{
// Get tool number
int toolNumber = op.OperationTool.Number;
// Get operation comment
string comment = op.Name;
// Look for an already added tool number comment and remove it
int index = op.Name.LastIndexOf(prefix);
if (index > 0)
{
comment = op.Name.Substring(0,index).TrimEnd();
}
// Modify comment
op.Name = comment + " - T" + toolNumber;
op.Commit(false);
}
catch
{
}
}
AddToolNumberToolpathComment.csx
I just looked at documentation and it shouldn’t be difficult to make a NETscript:
Get 'operations' array using SearchManager.GetOperations Method
Iterate each operation in 'operations' array :
- to get its 'tool' object using Operation.OperationTool Property then its number using Tool.Number Property
- modify comment operation with T+number with Operation.Name Property
I know NETscripting is limited regarding toolpath type so I don't know if this would work with any toolpath though... Then a CHook would only be able to do it.
I will try on monday if I have free time.
If you have Mastercam mill-turn it should be supported flawlessly.
I only have Mastercam lathe so on our integrex i need to manually add M codes successively to clamp/unclamp/pull-push stock. The important stuff for your application: it should exist a M-code to synchronize spindles.
Your tool seems correct and you should be alllowed to adjust projection from .85(shoulder) to 2.25 (oal). That s how it worked with 2023 though.
Are all your tools concerned?
To do this you also can use 'convert to 5x' toolpath.
However it can be better to use a tiny angle for tool axis control (something like 0.001° can be enough) to avoid a singularity issue.
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.