Hello Guest it is April 24, 2024, 01:20:56 AM

Author Topic: programatically setting the machine coordinate like in MDI form  (Read 3687 times)

0 Members and 1 Guest are viewing this topic.

Hi,
I would like to enhance the video plugin and to add some offset values when the webcam is aside from the drilling machine.

I have tryed to wrote something like :

#include "CMyScriptObject.h"
CMyScriptObject scripter;

scripter.SetParam("X",0.001);

not working ?
what it should be ?
from where I should find those info ?

Daniel
Re: programatically setting the machine coordinate like in MDI form
« Reply #1 on: April 21, 2008, 11:18:17 AM »
since nobody has answered I will try to do it myself :

   CString com;
   com.Format("G92 X %.4f Y %.4f", m_xoffset, m_yoffset);
   Code(com);

I still wait for constructive criticism or confirmation or infirmation.
Re: programatically setting the machine coordinate like in MDI form
« Reply #2 on: April 21, 2008, 04:15:13 PM »
Hi Daniel,

Did you ever get the tutorial plugin running?

You can't just declare the scripter object.  You must go through the steps to retrieve the IDispatch interface for Mach.

Sorry for the slow reply, since you created a new topic I didn't get an email that stuff was happening over here.

You must be sure Mach is idle before you can use the 'code' call.  See the usage of IsMoving in the macros, you can do the same thing from the object model in C++;

-James