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
 Forum for Origin C
 matrix.CopyFromWks
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

couturier

France
291 Posts

Posted - 12/03/2021 :  11:05:24 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 2022
Operating System: win10

Hi,

when copiing a wks to a matrix (with CopyFromWks()), is there any trick to ignore masked values in source wks (replace with missing values for example) ?

cpyang

USA
1406 Posts

Posted - 12/04/2021 :  3:57:27 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Masked values are copied as missing values, I tried with code

void wm()
{
	Worksheet wks = Project.ActiveLayer();
	MatrixPage MatPg1;
	MatPg1.Create("Origin");
	MatrixLayer MatLy1 = MatPg1.Layers(0);
	Matrix Mat1(MatLy1);

	Mat1.CopyFromWks(wks);
}



And here is what I saw


Can you check that you did not disable masking? try @MM= in script window.

CP
Go to Top of Page

couturier

France
291 Posts

Posted - 12/05/2021 :  09:15:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
you're right
Tested again with matrix object (not Matrix) and it works as well
I must have done something wrong elsewhere
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