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:

Solid Model - Hole Axis


DavidB
 Share

Recommended Posts

7 hours ago, JParis said:

It's not anywhere in the config so I would say there's currently no method

You could auto-fill it using windows with a hook or an application, but that goes for any window, and not easily done.

Heck a smart enough guy might even get it done use vba in excel, since the windows api is available.

Saying their is no method is misleading.

Link to comment
Share on other sites
22 minutes ago, Thee Byte™ said:

You could auto-fill it using windows with a hook or an application, but that goes for any window, and not easily done.

Heck a smart enough guy might even get it done use vba in excel, since the windows api is available.

Saying their is no method is misleading.

Ok

Then I guess I'm just a dumb guy.

 

 

 

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

Someone at CNC told me once a while back that it was not designed to have defaults but once you use it, it retains the values and then repeats the selections from the last session. 

Not from session to session. People have certain defaults they like. They want to always use those values and Mastercam in a lot of the newer sections doesn't have the ability to give the end user that functionality. Operation defaults allow us the control for toolpaths. End users want the same ability with things like this. Why cant there be a set to defaults button in these dialogs like the toolpaths? If there were then solves this issue and give the database a quick method to store them using a different subset of data to track and allow customization like other CAM software such as CATIA and NX have. Biggest gripe I hear from NX and CATIA guys moving from those software to Mastercam is things like this. I just fat finger so much stuff I cannot track all the key strokes and typing I do in a year. I wear out keyboards quite regularly. My A and S are deformed on this keyboard. Esc was normally wore off, but since about 2019. I have backed off the using the esc key as much since it doesn't do the same things it use to in a lot of the dialogs.

Link to comment
Share on other sites
11 minutes ago, crazy^millman said:

Esc was normally wore off, but since about 2019. I have backed off the using the esc key as much since it doesn't do the same things it use to in a lot of the dialogs.

Colin mentioned on another thread it only works if you hit it once, it doesnt seem to do much to mee..

Link to comment
Share on other sites
On 1/16/2021 at 6:19 AM, sir Camalot said:

Someone at CNC told me once a while back that it was not designed to have defaults but once you use it, it retains the values and then repeats the selections from the last session. 

This dialog box does not retain the last settings used.

 

Link to comment
Share on other sites

UI / Dialogs persistence is for me maybe the biggest factor to determine "good" or "bad" usability in a desktop program. Luckily Mastercam has improved a lot and appears to remembers all(?) dialog sizes and datagrid column widths. Still, why does "Offset" always default to 25? Why does "Search Operations" always have Tool number 3 as default? As a developer I say it is really not a big deal to implement persistence and lack of it is just laziness.

If it's a Win32 control you have the access to it via window handle so what Byte said is true. There was/is a guy here who kept advertising a tool called "Form Filler", maybe try it? Or learn and write a AutoHotKey script? However, with ribbon came WPF dialogs and they are nearly impossible to automate. You have to use something like process explorer etc. to check if you can inspect individual controls like text boxes on a dialog and if yes, it can be automated.

Link to comment
Share on other sites
6 hours ago, SlaveCam said:

If it's a Win32 control you have the access to it via window handle so what Byte said is true. 

Mastercam is an MFC application, MFC is a wrapper for the Windows Api (Win32).

If you want to programatically edit windows owned by an external application, EnumWindows will give you all the windows, EnumChildWindows will give you the subwindows.Those functions each take a callback as a parameter and call it on each existing window.

The text data can be extracted to determine which window is to be targeted for autofill using WM_GET_TEXT_LENGTH and WM_TEXT.

SetWindowsHookEx overrides all future instances of Dialogs. 

I haven't got as far as autofilling the fields yet... 

SlaveCam, if you interested I can give you source code.

Link to comment
Share on other sites

Hello Byte,

To be honest, I'm not a big fan of low-level APIs, as getting things done quickly and "low level" don't often mix well. I am a fan of getting things done quickly and fall back to low level only if absolutely necessary. For me, MFC is a necessary evil because everything is built on Win32 and it's been maybe some 15 years I used MFC daily and don't really miss it :)

Mastercam C-hook API is based on MFC so well, it is a must-have knowledge. But to say Mastercam is a MFC app is maybe an understatement; it does require the Visual C++ runtime libraries, but I'm sure it would not work at all without .NET framework and Presentation Framework libraries these days (among other things). So I like to call MC a hybrid win app.

What comes to the Hole-Axis dialog, those controls and the whole dialog is obviously WPF-made (the entire dialog is contained in a hardware accelerated render context), so unfortunately you will not be able to use those Win32 methods to manipulate them.

Link to comment
Share on other sites
3 hours ago, SlaveCam said:

Hello Byte,

To be honest, I'm not a big fan of low-level APIs, as getting things done quickly and "low level" don't often mix well. I am a fan of getting things done quickly and fall back to low level only if absolutely necessary. For me, MFC is a necessary evil because everything is built on Win32 and it's been maybe some 15 years I used MFC daily and don't really miss it :)

Ya, I mean you could write your application without mfc, but the editor and event handler support allow developers to build quick gui.

3 hours ago, SlaveCam said:

Mastercam C-hook API is based on MFC so well, it is a must-have knowledge. But to say Mastercam is a MFC app is maybe an understatement; it does require the Visual C++ runtime libraries, but I'm sure it would not work at all without .NET framework and Presentation Framework libraries these days (among other things). So I like to call MC a hybrid win app.

True .Net is being run on top of mfc, some newer add-ins are written in c#. .Net is intregrated deeply into windows. Although, from what I heard, Microsoft is moving away from .Net a bit for low level work.

3 hours ago, SlaveCam said:

What comes to the Hole-Axis dialog, those controls and the whole dialog is obviously WPF-made (the entire dialog is contained in a hardware accelerated render context), so unfortunately you will not be able to use those Win32 methods to manipulate them.

Although WPF contains cross platform solutions, it's important to remember that all windows inherit from win32.

Even windows created in win32 can be edited using the https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowshookexa SetWindowsHook and GetWindowLongPtr functions.

I use it to override windows created for cross platform with libraries like glfw or wpf to access modern opengl libraries, since they always include pre-created windows containing the device rendering context you need.

To summarize, all windows inherit from win32, because that's how windows works. So the functions I listed above can always be used.

Link to comment
Share on other sites
9 hours ago, SlaveCam said:

What comes to the Hole-Axis dialog, those controls and the whole dialog is obviously WPF-made (the entire dialog is contained in a hardware accelerated render context), so unfortunately you will not be able to use those Win32 methods to manipulate them.

Upon re-reading this, it occured to me I build one of these dockable windows recently, it was done in MFC, you can request see the opMgrPge  example project from the sdk team.

2 minutes ago, crazy^millman said:

Thank for allowing me to nerd out this morning. Brings back memories. I was talking to my brother and he reminded me when I hacked Dig-Dug to give me infinite lives 35+ years ago.

I guess its sad when people have to hack a CAM Software to make it more user friendly.

I think the ability to autofill fields is lacking on windows in general, should this have been done on the software side, yes probably..

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