Welcome, Guest. Please login or register.
Did you miss your activation email?
December 01, 2008, 10:01:04 PM

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.
| | |-+  programatically setting the machine coordinate like in MDI form
Pages: 1   Go Down
Print
Author Topic: programatically setting the machine coordinate like in MDI form  (Read 737 times)
0 Members and 1 Guest are viewing this topic.
dandumit
Active Member

Offline Offline

Posts: 34


View Profile
« on: April 17, 2008, 10:20:25 AM »

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
Logged
dandumit
Active Member

Offline Offline

Posts: 34


View Profile
« Reply #1 on: April 21, 2008, 10: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.
Logged
jemmyell
Active Member

Online Online

Posts: 70


View Profile WWW
« Reply #2 on: April 21, 2008, 03: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
Logged

Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!