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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 MATLAB Com server example throws error

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
mahesh2444 Posted - 05/31/2021 : 07:39:56 AM
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.

3   L A T E S T    R E P L I E S    (Newest First)
minimax Posted - 06/01/2021 : 9:36:10 PM
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
mahesh2444 Posted - 06/01/2021 : 07:59:43 AM
It did worked.
Can you brief me on this additional argument ?
minimax Posted - 06/01/2021 : 04:20:57 AM
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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000