The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 pointproc not working as indicated.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

andrewdsto

Australia
Posts

Posted - 03/29/2010 :  10:43:23 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 8.0 and Service Release 5 (Select Help-->About Origin):
Operating System: win xp

Hi, I am trying to use the pointproc macro to return mks1 and mks2 using the data selector tool (dotool 4). But it does not appear to activate when using todool 4. I am using it on a single plot containing 4 layers with each layer containing a single graph. Although it does not appear to work on a single plot either.

However The pointproc macro does work with the screen reader and the data reader tools for this 4 layer setup. Just not the data selector tool.

I am not doing anything strange at all. All I am doing is returning mks1 and mks2. eg

def pointproc {
mks1=;
mks2=;
};

I can run dotool 4; either before or after defining the pointproc with no difference.

Is this a bug? Do I have to do something different?

thanks Andrew

larry_lan

China
Posts

Posted - 03/30/2010 :  03:03:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Andrew:

What happened when you run the following script:

def pointproc {
mks1=;
mks2=;
};
Dotool 4;


It is supposed you cursor would turn into Data Selector sign as below:



You can then click the curve. So, did you see the cursor changed?

Larry
Go to Top of Page

greg

USA
1378 Posts

Posted - 03/30/2010 :  09:31:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
What you are trying to do does not make sense. If you do something like

dotool 4; // Start the Data Reader tool
def pointproc {
mks1=;
mks2=;
}

you will defeat the purpose of the Data Reader which is to set the data markers. Normally when you start the DR, the pointproc macro is defined to end the tool and restore the Pointer tool as default. By re-defining pointproc you have prevented DR from setting the markers.

I am not sure what your ultimate intent is, but you can use mks X-Function to read all data markers (not just the most recently set markers mks1 and mks2) into datasets as in:

dataset dsBegin,dsEnd;
mks ob:=dsBegin oe:=dsEnd sort:=0;
loop(ii,1,dsBegin.GetSize())
{
ty $(dsBegin[ii]) : $(dsEnd[ii]);
}

P.S. I recommend you use Help : Check for Updates to get SR6 which is more stable than SR5.
Go to Top of Page

andrewdsto

Australia
Posts

Posted - 04/09/2010 :  03:12:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Guys, I was not actually trying to read the markers, I was simply using that as an example. I intended pointproc to actually trigger and run an external script file.

For example if I want to integrate the area under the curve. I would first run a script file I had written to automatically set my data markers to say the beginning of actual data event and another point, say where the record crosses the Y zero axis. However if I was not happy with where my script placed the first marker, I wanted to redefine the pointproc to run my integration script after I had adjusted the markers.

So I would run
def pointproc {
run.section(integrateplot.ogs, intplot); // or some such procedure
};

I would then run dotool 4 on my plot where the data makers were already set so I could change their position. The data selector tool would appear and I could change the markers position Ok, I would then hit enter, thus changing the makers position and automatically selecting tool 0.

However upon hitting the enter key to set the markers in the new position and automatically selecting tool 0, pointproc does not trigger.

Curiously if I selected another tool such as the screen reader or data reader tools (dotool 2 & dotool 3) and double clicked on the graph, the pointproc would trigger and my script would run.

So I was not trying to actually read the makers, it was merely an illustration, ie: simply return mks1 and mks2, nice and simple.

thanks Andrew
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000