Hello Chi-Tuan,
Many thanks for your reply. Here are some feedbacks for your code.
I have included your code, and it is good that it will not report an error even when I activated the mask function.
But now the problem is that it cannot mask the elements I defined, actually, I have masked several elements in front of a pier, but you can check the picture I attached, and it shows that it is not in effect.
Best,
wenjun