Hello Guest it is November 18, 2019, 09:21:30 PM

Author Topic: MachPluginWizard v1.1 BETA Release  (Read 42125 times)

0 Members and 1 Guest are viewing this topic.

Offline ART

*
  • *
  •  1,698 1,698
  • Tough as soggy paper.
    • View Profile
Re: MachPluginWizard v1.1 BETA Release
« Reply #10 on: March 03, 2009, 08:46:02 AM »
Ed:

 Nice job on the video's. They are harder to do than most think and I think
you did a fine job.

Art

Offline j1sys

*
  •  16 16
    • View Profile
Re: MachPluginWizard v1.1 BETA Release
« Reply #11 on: March 03, 2009, 10:26:42 AM »
thanx to all for their testing and comments.

attached is an updated install module. this one doesn't make a .rc file for version information. if you want to save the step of deleting the .rc after creating your project you can uninstall the original beta and install this one. none of your existing projects will be changed.

i didn't bother to give it a new version number. i just identified the installer file with a 1.1a on the end.

-ed
Re: MachPluginWizard v1.1 BETA Release
« Reply #12 on: June 22, 2009, 02:19:58 PM »
Dear Ed:
I installed the plugin wizard with Visual Studio Express 2008, worked great.
Now I want to incorporate ATL in the plugin, I upgraded the Visual Studio to a Professional 2008 version, uninstalled the wizard, reinstalled so it can detect the new version: but it still had the ATL and MFC grey out.
Can you help to see how I can get the wizard recognize the new version?
Thanks,
Tac.
Re: MachPluginWizard v1.1 BETA Release
« Reply #13 on: August 14, 2009, 03:11:13 AM »
Fantastic job Ed... Thank you!

I've been struggling with a new plugin using the SDK - finding your Wizard and videos is helping a LOT.

One issue so far...
My development system is VS2008 on Vista x64, I can compile and load new plugins as you've shown in the videos; however, I'm having issues loading GCode files under Vista (not really an issue with the Wizard or your code).

As a workaround to the GCode loading issue, I've been using an XP virtual machine. I was able to compile the SDK examples, register them on the XP image, and load them; however, with the Plugins genereated via the Wizard, I am getting two error message boxes when they

The first, "[Mach 4] Plugin DLL defective. Reload."
Followed by, "[Mach 4] XYZTutor.dll - Defective Plugin Found..ignoreing.."

I'm thinking it might have something to do with the compile under x64 vs. x86. My first guess was that I was missing the "framework", but the problem remained after I installed Framework 3.5 on the virtual machine.

Any ideas?

Thanks again for a great contribution,
Benjamin Liedblad

Offline poppabear

*
  • *
  •  2,233 2,233
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: MachPluginWizard v1.1 BETA Release
« Reply #14 on: August 14, 2009, 08:47:22 AM »
Ben,

    I run Vista 64, your decribing a Mach3/Vista issue mostly, read the "Vista" thread, getting Mach3 to work with Vista.

if you get the Plugin errors then you have done something wrong in your plugin. Also, make SURE you are using the latest SDK........

scott
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/
Re: MachPluginWizard v1.1 BETA Release
« Reply #15 on: August 14, 2009, 02:09:08 PM »
Perhaps someone else can confirm this...

I was able to get able to get a my plugin (compiled on Vista x64 with Ed's VS2008 Wizard) working on a "clean" XP system (i.e. no development tools), but the compiled plugin MUST be a "release build".

A "debug build" produces the error messages I described in a previous post.

Offline 4z7

*
  •  16 16
    • View Profile
Re: MachPluginWizard v1.1 BETA Release
« Reply #16 on: October 14, 2009, 06:26:05 PM »
I've been working on a plugin using Ed's managed template for a few months now.  Most of that time has been spent learning C++/CLI starting from a minimal knowledge of VB.  CLI is sure frustrating.

Can't figure this out

1.  Is there a way to set the Mach error label like  MachErrorMsg("*********x") or SetMachError("*********x")? From the Shuttle Plugin:

   void SetMachError(Cstring Message){
      CString *err = &MainPlanner->LastError;
      if(err != NULL )
      *err = Message;"}

   SetMachError("*********xx");

In Ed's -TrajectoryControl structure LastError is a LPCSTR pointer. In C++/CLI I came up with:

   void SetMachError(LPCSTR Message){   
      LPCSTR err =   (LPCSTR)&MainPlanner->LastError;
      if(err != nullptr )
      err = Message;// Compiles NO OUTPUT

      //(LPCSTR)err = Message;  //Compiles NO OUTPUT
      // MainPlanner->LastError = Message; // Compiles but Mach ArtError9991
      //MainPlanner->LastError = err;   // Compiles but Mach locks up   
}

   
Has anybody figured this out?

thanks,
Kurt


Offline kcrouch

*
  •  193 193
  • In way too deep!!!
    • View Profile
Re: MachPluginWizard v1.1 BETA Release
« Reply #17 on: October 14, 2009, 08:26:41 PM »
This works for me. Not sure if it will help in your situation though.

   Com.Format("Probing %d points!", State.ThreeDProbeData.TdpTotal);
SetMachError(Com);
Having way too much fun! Something must surely be wrong.

Offline 4z7

*
  •  16 16
    • View Profile
Re: MachPluginWizard v1.1 BETA Release
« Reply #18 on: October 15, 2009, 10:11:36 PM »
Ken,
Thanks for the reply.  I'm glad someone is reading this thread.  I don't really understand your code. I think it's a VB script maybe from a mach screen control.  I want to write to the mach screen error label from a C++/Cli managed plugin.  After more research (hours and hours) I think this is the code that should work but it doesn't.


using namespace System::Runtime::InteropServices;

namespace Joystick {
void SetMachError(String^ Message)

{                  //LPCSTR_TrajectoryControl::LastError
   String^ ms = Marshal::PtrToStringAnsi((IntPtr)&MainPlanner->LastError );   
   if( ms != nullptr )
   {      ms = Message;
      // //MessageBox::Show("ms " + ms );return;// "ms Did we get here?"
   }
}



void funcs(){
   SetMachError("Did we get here?");
   };
}   


I've also tried the following String^ ms managed pointers.

   String^ ms = Marshal::PtrToStringAnsi((IntPtr) (void*) &MainPlanner->LastError );
      Marshal::PtrToStringAuto
      Marshal::PtrToStringBSTR
      Marshal::PtrToStringUni


They all compile but none display in the Mach error label. I have confirmed with a MessageBox that  ms is NOT Null.
 Maybe  it can't happen because in Ed's _TrajectoryControl::LastError is a LPCSTR and in Mach TrajectoryControl. LastError is a CString .



Kurt

Offline kcrouch

*
  •  193 193
  • In way too deep!!!
    • View Profile
Re: MachPluginWizard v1.1 BETA Release
« Reply #19 on: October 16, 2009, 09:19:37 AM »
Kurt,
That code is compiled using VS2003. It is c++, but I don't use Cli.
The key is to get the data formatted properly as a string so that it will display. The com.format accomplishes that.
Kenny
Having way too much fun! Something must surely be wrong.