tom.wery 发表于 2005-1-8 19:12:00

请问版主,我为什么设置AngBase变量不能成功???附代码。

struct resbuf rb, rb1,rb2,rb3;       
        acedGetVar("ANGDIR", &rb);
        rb1.restype = RTSHORT;
        rb1.resval.rint =1;
                       if (acedSetVar("ANGDIR", &rb1) != RTNORM)
        {
                                                       acedAlert("设置系统变量ANGDIR时出错");
                                                       return ; // Setvar failed.
        }
        acedGetVar("ANGBASE", &rb2);                        rb3.restype = RTREAL;
        rb3.resval.rint = 270.0;
                       if (acedSetVar("ANGBASE", &rb3) != RTNORM)
        {
                                                       acedAlert("设置系统变量ANGBASE时出错");
                                                       return ; // Setvar failed.
        }

tom.wery 发表于 2005-1-8 19:20:00

我想把初起始角度改成正北方向, 可是不成功,烦版主帮忙。

yindb 发表于 2005-1-8 20:23:00

acedGetVar("ANGBASE", &rb2);                        rb3.restype = RTREAL;
        rb3.resval.rint = 270.0;
好好看看这两句,不匹配啊!

tom.wery 发表于 2005-1-11 18:22:00

谢谢,我太粗心了.

291118 发表于 2005-1-19 10:54:00

怎么改啊

291118 发表于 2005-1-19 11:26:00

rb3.restype = RTREAL;
        rb3.resval.rint =HBlc/1000.00;
                       if (acedSetVar("dimlfac", &rb3) != RTNORM)
        {
                                                       acedAlert("设置系统变量dimlfac时出错");
                                                       return ; // Setvar failed.
        }       
       
为什么出错

291118 发表于 2005-1-20 08:47:00

没人答我自己明白了

JA_JERRY 发表于 2005-1-20 09:31:00

恭喜,自己学会的东西是最牢固的
页: [1]
查看完整版本: 请问版主,我为什么设置AngBase变量不能成功???附代码。