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 for Programming
 LabTalk Forum
 MATLAB Com server example throws error
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

mahesh2444

India
5 Posts

Posted - 05/31/2021 :  07:39:56 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 2021b and Service Release (Select Help-->About Origin): 9.8.5.204
Operating System: Windows 10 21H1

MATLAB Com server script given in origin scripting examples is throwing error, when used with latest version of Origin 2021b. Below is the line where the error (Type mismatch) occurs:

Error: Type mismatch, argument 3
Error in MATLABCallOrigin (line 81)
dps.Add(dr, 202); % 202 for symbol+line plot

I didn't face such a situation with the previous versions of Origin. Would appreciate your help if anybody let me know how can I pass the argument to Origin without any Type mismatch or any quick fixes to avoid error.

minimax

359 Posts

Posted - 06/01/2021 :  04:20:57 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi mahesh2444,

Sorry for the inconvenience.

Would you mind to try to add "true" as the 3rd argument to see the problem would be gone?

i.e.
dps.Add(dr, 202, true);


We will try to fix the problem accordingly. (bug record id: ORG-23784)

Max
OriginLab Technical Support
Go to Top of Page

mahesh2444

India
5 Posts

Posted - 06/01/2021 :  07:59:43 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It did worked.
Can you brief me on this additional argument ?
Go to Top of Page

minimax

359 Posts

Posted - 06/01/2021 :  9:36:10 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
We added the 3rd argument in 2021b.
It is used to indicate whether the data range dr is a composite range or not.

XYRange/XYZRange is composite range, so in the sample case it should be true.

In 2021b we mistakenly treat it as not-composite, so you will have to pass it explicitly to workaround the problem.

Max
OriginLab Technical Support
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