chr
2024-08-07 22beee93f14d042aa184148c53efb79e23416526
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using SolidWorks.Interop.sldworks;
 
namespace PdmSwPlugin.Common.Util
{
    public class DocUtil
    {
        public static bool IsSameDoc(ModelDoc2 doc1, ModelDoc2 doc2)
        {
            // 傻逼C#,直接=赋值的对象==返回false,qnmd弱智东西
            if (doc1 == doc2)
            {
                return true;
            }
            string sb1 = doc1?.GetPathName();
            string sb2 = doc2?.GetPathName();
            return sb1 == sb2;
        }
    }
}