几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(C++) (http://www.dimcax.com/hust/forumdisplay.php?f=34)
-   -   【转帖】[arx]我愛學習arx剛剛起步, 多多指教啊 (http://www.dimcax.com/hust/showthread.php?t=6480)

yang686526 2009-04-16 12:20 PM

【转帖】[arx]我愛學習arx剛剛起步, 多多指教啊
 
[arx]我愛學習arx剛剛起步, 多多指教啊
[arx]我愛學習arx剛剛起步, 多多指教啊
我刚学会一点点的arx. 先来一个改lisp涵数的涵数getpoint的名为userpoint源码.
// this is command 'userpoint'
int userpoint()
{
// todo: implement the command
resbuf *parg =acedgetargs () ;
if( parg == null)
{
acedretnil();
return rterror;
}
else
{
cstring strin;
resbuf *tb;
ads_point pt1;
tb= parg;
strin = tb->resval.rstring;
acedgetpoint(null,strin,pt1);
//acedgetsym("pt1",pt1);
acedretpoint(pt1);
}
return (rtnorm) ;
}
跟随上面的方式, 我想再改进改进. 但不太会, 请大侠指点指点啊!
我想改把这个涵数改成 (userpoint [变量名] [提示]); 这样用的
意思是想把这个userpoint涵数是得出的点做成一个变量, 这个变量就是在涵数输入的第一个参数 [变量名], 还望多多指教, 谢谢!!!!
要学习arx,就要抛开lisp的编程习惯,不要再费劲去改成lisp的格式了吧。
呵呵. 不能一下就抛开的. 因为我不能一下就放下工作马上改用arx, 因为没有人能接手我手上的工作嘛. 只能一边在开发vlisp的同时学会arx, 等会了才可以慢慢的转变的啊., 虽然过程有点慢,


所有的时间均为北京时间。 现在的时间是 04:58 AM.