找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 1655|回复: 0

[教学] 也发一个我写的一个LISP调用进度条源码

[复制链接]

已领礼包: 12个

财富等级: 恭喜发财

发表于 2013-8-7 07:36:20 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
  1. static int ads_progress1(void)
  2. {
  3.   //----- Remove the following line if you do not expect any argument for this ADS function
  4.   struct resbuf *rb =acedGetArgs () ;
  5.   // TODO: add your code here
  6.   if (rb == NULL)
  7.   {
  8.    acdbFail("参数太少");
  9.    acedRetVoid();
  10.    return RTERROR;
  11.   }
  12.   char *str;
  13.   if (rb->restype == RTSTR)
  14.   {
  15.    str = rb->resval.rstring;
  16.   }
  17.   else
  18.   {
  19.    acdbFail("参数错误");
  20.    acedRetVoid();
  21.    return RTERROR;
  22.   }
  23.   rb = rb->rbnext;
  24.   if (rb == NULL)
  25.   {
  26.    acdbFail("参数太少");
  27.    acedRetVoid();
  28.    return RTERROR;
  29.   }
  30.   long maxs,mins;
  31.   if (rb->restype == RTLONG)
  32.   {
  33.    mins = rb->resval.rlong;
  34.   }
  35.   else if(rb->restype == RTSHORT)
  36.   {
  37.    mins = rb->resval.rint;
  38.   }
  39.   else
  40.   {
  41.    acdbFail("参数错误");
  42.    acedRetVoid();
  43.    return RTERROR;
  44.   }
  45.   rb = rb->rbnext;
  46.   if (rb == NULL)
  47.   {
  48.    acdbFail("参数太少");
  49.    acedRetVoid();
  50.    return RTERROR;
  51.   }
  52.   if (rb->restype == RTLONG)
  53.   {
  54.    maxs = rb->resval.rlong;
  55.   }
  56.   else if(rb->restype == RTSHORT)
  57.   {
  58.    maxs = rb->resval.rint;
  59.   }
  60.   else
  61.   {
  62.    acdbFail("参数错误");
  63.    acedRetVoid();
  64.    return RTERROR;
  65.   }
  66.   if (rb->rbnext !=NULL)
  67.   {
  68.    acdbFail("参数太多");
  69.    acedRetVoid();
  70.    return RTERROR;
  71.   }
  72.   acedSetStatusBarProgressMeter(str,mins,maxs);
  73.   acedRetVoid();
  74.   return RTNORM;
  75.   // TODO: Replace the following line by your returned value if any
  76.   acedRetVoid () ;
  77.   return (RSRSLT) ;
  78. }
  1. static int ads_progress2(void)
  2. {
  3.   //----- Remove the following line if you do not expect any argument for this ADS function
  4.   struct resbuf *rb =acedGetArgs () ;
  5.   // TODO: add your code here
  6.   if (rb == NULL)
  7.   {
  8.    acdbFail("参数太少");
  9.    acedRetVoid();
  10.    return RTERROR;
  11.   }
  12.   long maxs,mins;
  13.   if (rb->restype == RTLONG)
  14.   {
  15.    mins = rb->resval.rlong;
  16.   }
  17.   else if(rb->restype == RTSHORT)
  18.   {
  19.    mins = rb->resval.rint;
  20.   }
  21.   else
  22.   {
  23.    acdbFail("参数错误");
  24.    acedRetVoid();
  25.    return RTERROR;
  26.   }
  27.   
  28.   if (rb->rbnext !=NULL)
  29.   {
  30.    acdbFail("参数太多");
  31.    acedRetVoid();
  32.    return RTERROR;
  33.   }
  34.   acedSetStatusBarProgressMeterPos(mins);
  35.   acedRetVoid();
  36.   return RTNORM;
  37.   // TODO: Replace the following line by your returned value if any
  38.   acedRetVoid () ;
  39.   return (RSRSLT) ;
  40. }
  41. // ----- ads_progress3 symbol (do not rename)
  42. static int ads_progress3(void)
  43. {
  44.   //----- Remove the following line if you do not expect any argument for this ADS function
  45.   struct resbuf *pArgs =acedGetArgs () ;
  46.   // TODO: add your code here
  47.         acedRestoreStatusBar();
  48.   // TODO: Replace the following line by your returned value if any
  49.   acedRetVoid () ;
  50.   return (RSRSLT) ;
  51. }
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-4-28 23:30 , Processed in 0.401028 second(s), 31 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表