请问版主,我为什么设置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.
} 我想把初起始角度改成正北方向, 可是不成功,烦版主帮忙。 acedGetVar("ANGBASE", &rb2); rb3.restype = RTREAL;
rb3.resval.rint = 270.0;
好好看看这两句,不匹配啊! 谢谢,我太粗心了. 怎么改啊 rb3.restype = RTREAL;
rb3.resval.rint =HBlc/1000.00;
if (acedSetVar("dimlfac", &rb3) != RTNORM)
{
acedAlert("设置系统变量dimlfac时出错");
return ; // Setvar failed.
}
为什么出错
没人答我自己明白了 恭喜,自己学会的东西是最牢固的
页:
[1]