Hello Guest it is March 28, 2024, 05:16:37 AM

Author Topic: Mach3: Expose APIs from Mach4.Document  (Read 3443 times)

0 Members and 1 Guest are viewing this topic.

Mach3: Expose APIs from Mach4.Document
« on: April 09, 2019, 12:27:42 PM »
Hi,

I want to get eg. XYZ coord from Mach3; upload G code to Mach3, run G code ... etc.,  using C++. I found a example called "MachRemote" which can connect to Mach3 via an ActiveObject called "Mach4.Document".

I can run MachRemote now, but I don't know which APIs or commands I can use ?? From source code of MachRemote, I can find

    scripter.ActivateSignal()
    scripter.GetOEMLed()
    scripter.DoOEMButton()

Is there something like ... scripter.CycleStart() or scripter.Reset() ????

where can I get the complete list of exposed APIs from Mach4.Document ?
Thanks a lot.


Regards,
KC
Die hard vi lover ;-)

Offline MN300

*
  •  297 297
    • View Profile
Re: Mach3: Expose APIs from Mach4.Document
« Reply #1 on: April 09, 2019, 01:53:34 PM »
The API list should be in Mach4Hobby/Docs/Mach4CoreAPI.chm on your hard drive.
Re: Mach3: Expose APIs from Mach4.Document
« Reply #2 on: April 09, 2019, 03:14:35 PM »
The API list should be in Mach4Hobby/Docs/Mach4CoreAPI.chm on your hard drive.

Yes, it's there ;-) Thanks.

KC
Die hard vi lover ;-)
Re: Mach3: Expose APIs from Mach4.Document
« Reply #3 on: April 09, 2019, 03:30:54 PM »
Hi,

I had looked at Mach4CoreAPI.  It's pure C/C++ APIs, but I don't think I can use them for Mach3 ???
For Mach3, I need APIs exposed by COM object "Mach4.Document" ???


Regards,
KC


The API list should be in Mach4Hobby/Docs/Mach4CoreAPI.chm on your hard drive.
Die hard vi lover ;-)
Re: Mach3: Expose APIs from Mach4.Document
« Reply #5 on: April 09, 2019, 10:19:03 PM »
Thanks

In fact, I had all these documents, and I had quick read of them before I ask question here.
These documents do help, but none of them mentioned about COM and "Mach4.Document".

The only information I found is the "MachRemote" example and one modified from MachRemote
which compiled by mingw and can upload G-code to Mach3.

After a lot of google search ... I think there is no official document for COM, hopefully I'm wrong.

Regards,
KC
Die hard vi lover ;-)
Re: Mach3: Expose APIs from Mach4.Document
« Reply #6 on: April 09, 2019, 10:26:17 PM »
Hi,
as you probably know all Mach3 development ceased five years ago. If documentation is not available now it never
will be.

Mach4 on the other is current and developing. If you have a specific project and sign an NDA (non disclosure agreement)
with NFS then you would get ALL the inside gen on Mach4.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach3: Expose APIs from Mach4.Document
« Reply #7 on: April 09, 2019, 10:43:33 PM »
That's helpful, Thanks
Die hard vi lover ;-)

Offline reuelt

*
  •  520 520
    • View Profile
Re: Mach3: Expose APIs from Mach4.Document
« Reply #8 on: April 09, 2019, 11:24:31 PM »
You just need to import these registry entries into Windows
(Administrator rights required)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Mach4.Document]
@="Mach4.Document"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Mach4.Document\CLSID]
@="{CA7992B2-2653-4342-8061-D7D385C07809}"


Copy & save into a text file say regentry.reg

start| run
Regedit
Import regentry.reg

Close
reboot PC
« Last Edit: April 09, 2019, 11:28:50 PM by reuelt »
"the gift of God is eternal life through Jesus Christ our Lord"
Re: Mach3: Expose APIs from Mach4.Document
« Reply #9 on: April 09, 2019, 11:32:18 PM »
Thanks for reply.

I did have these KEY in registry.  In fact, my copy of MachRemote working perfectly. 
It can connect to Mach3 and Reset Mach3.

My question is where is the complete list of available APIs exposed from COM object (Active Object) "Mach4.Document".


You just need to import these registry entries into Windows
(Administrator rights required)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Mach4.Document]
@="Mach4.Document"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Mach4.Document\CLSID]
@="{CA7992B2-2653-4342-8061-D7D385C07809}"


Copy & save into a text file say regentry.reg

start| run
Regedit
Import regentry.reg

Close
reboot PC
Die hard vi lover ;-)