Beispiel #1
0
        //获取当前操作对象的属性,并显示在状态栏中
        void SelectSize()
        {
            double l = 0, t = 0, r = 0, b = 0;
            int    nRet = CSharpInterface.HS_GetObjProperty(ref l, ref t, ref r, ref b);

            if (0 == nRet)
            {
                tsslabObjSize.Text = "对象属性:[宽" + (r - l).ToString("f2") + "mm,高"
                                     + (t - b).ToString("f2") + "mm,中心(" + (0.5 * (r + l)).ToString("f2") + "," + (0.5 * (t + b)).ToString("f2") + ")]";
            }
            else
            {
                ShowLastError();
            }
        }