Welcome, Guest. Please login or register.
Did you miss your activation email?
July 27, 2017, 01:43:08 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Mach SDK plugin questions and answers.
| | |-+  MachPluginWizard v1.1 BETA Release
Pages: « 1 2 3 4 »   Go Down
Print
Author Topic: MachPluginWizard v1.1 BETA Release  (Read 28263 times)
0 Members and 1 Guest are viewing this topic.
ART
Administrator
*
Offline Offline

Posts: 1,667


Tough as soggy paper.


View Profile
« 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
Logged
j1sys
Mach4 Alpha

Offline Offline

Posts: 16


View Profile
« 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

* MachPluginWizardSetup1.1a.msi (572.5 KB - downloaded 1282 times.)
Logged
tachuynh
Holding

Offline Offline

Posts: 1


View Profile
« Reply #12 on: June 22, 2009, 01: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.
Logged
bliedblad
Holding

Offline Offline

Posts: 2


View Profile
« Reply #13 on: August 14, 2009, 02: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
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 2,264


Briceville, TN, USA


View Profile WWW
« Reply #14 on: August 14, 2009, 07: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
Logged

Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/
bliedblad
Holding

Offline Offline

Posts: 2


View Profile
« Reply #15 on: August 14, 2009, 01: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.
Logged
4z7
Active Member

Offline Offline

Posts: 16


View Profile
« Reply #16 on: October 14, 2009, 05: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


Logged
kcrouch
Active Member

Offline Offline

Posts: 193


In way too deep!!!



View Profile
« Reply #17 on: October 14, 2009, 07: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);
Logged

Having way too much fun! Something must surely be wrong.
4z7
Active Member

Offline Offline

Posts: 16


View Profile
« Reply #18 on: October 15, 2009, 09: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
Logged
kcrouch
Active Member

Offline Offline

Posts: 193


In way too deep!!!



View Profile
« Reply #19 on: October 16, 2009, 08: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
Logged

Having way too much fun! Something must surely be wrong.
Pages: « 1 2 3 4 »   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!