明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: highflybir

[【高飞鸟】] 【飞鸟集】心随我动--为LISP定制的动态输入,拖拉和动态信息函数(更新至20130731)

    [复制链接]
发表于 2015-6-11 07:27 | 显示全部楼层
老师说,这个可以顶,必须顶‘
发表于 2015-6-12 06:18 | 显示全部楼层
真是太厉害了~谢谢您的提供分享~
发表于 2015-6-13 18:33 | 显示全部楼层
本帖最后由 masterlong 于 2015-6-13 18:38 编辑

使用过程中发现问题报告

WINXP+CAD2004

1.
如果打开新图
加载并运行动态函数
关闭dwg时没有问题

如果运行一些其它程序以后
再关闭dwg时
不会影响dwg的保存
但会跳出错误信息窗口
截图如下


2.
貌似HFB_SSJIG函数本身不支持右键状态的返回?

3.
另外调用函数完成后
光标不能自动恢复成正常模式
程序中额外添加了一个(command)来解决这个问题

程序如下:


希望高大侠有空能指导一下

本帖子中包含更多资源

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

x
发表于 2015-6-13 18:44 | 显示全部楼层
我的电脑里加载的第三方函数库有

acetutil.arx ;;acet函数库
DocBar_2004.arx  ;;多文档工具
doslib16.arx  ;;doslib函数库
BladeR16.arx  ;;乱刀去教育戳
OpenDCL.16.arx  ;;opendcl运行支持
发表于 2015-9-1 16:27 | 显示全部楼层
虽然不懂,但收藏了
发表于 2016-10-7 22:46 | 显示全部楼层
本帖最后由 greatvictory 于 2016-10-7 22:53 编辑

不知为什么调用个自己写的函数就失灵,篇幅缘故弄了test示意一下,要用到两个参数,当前点的位置,悬停图元的码表,返回一个字符串,在动态里显示,大概就是这么个功能,求问为啥一用函数就失灵呢?就拿贴主的演示代码,第7行保存了个当前点,42行调用了下test函数,53行后面是test的内容,求指导啊!
  1. ;;;*********************************************************************;;;Example 1: shows how to display the infomation of an entity and the  
  2. ;;;position of cursor,and its current osnap mode.                       
  3. ;;;*********************************************************************
  4. (defun c:Info (/ ret)
  5.   (defun InfoCallback (dynpt / txt elist osmod NNest dat)
  6.     (setq txt (vl-princ-to-string (mapcar 'rtos dynpt)))
  7.     (setq p txt)
  8.     (setq txt (strcat "The coordinate is: " txt))
  9.     (setq elist (HFB_GetAperture))                                                ; Aperture Entities
  10.     (setq osmod (HFB_GetOSMode))                                                ; current osnap modes
  11.     (setq NNest (HFB_GetNested))                                                ; nested Aperture Entities
  12.     (if        (> osmod 0)
  13.       (progn
  14.         (princ "\nThe osnap mode is: ")
  15.         (princ (cdar (vl-member-if
  16.                        '(lambda (x) (/= (logand osmod (car x)) 0))
  17.                        '((1 . "Endpoint")
  18.                          (2 . "Midpoint")
  19.                          (4 . "Center")
  20.                          (8 . "Node")
  21.                          (16 . "Quadrant")
  22.                          (32 . "Intersection")
  23.                          (64 . "Insert")
  24.                          (128 . "Perpendicular")
  25.                          (256 . "Tangent")
  26.                          (512 . "Nearest")
  27.                          (1024 . "Apparent intersection")
  28.                          (2048 . "Parallel")
  29.                          (4096 . "Extension")
  30.                         )
  31.                      )
  32.                )
  33.         )
  34.       )
  35.     )

  36.     ;;If there are entities nearby the cursor,then display the infomation
  37.     ;;about the first one.
  38.     (if        elist
  39.       (progn
  40.         (setq dat (entget (car elist)))
  41.         (strcat txt "\nThe type of aperture Entity is: " (test dat p)))
  42.       )
  43.       txt
  44.     )
  45.   )

  46.   (setq ret (HFB_PointMonitor "InfoCallback"))
  47.   (prompt "\nIf you want to turn off the monitor,please use (HFB_PointMonitor) or command \"IPMOFF\".")
  48.   (princ)
  49. )

  50. (defun test (e p)
  51.   (strcat (cdr (assoc 1 e)) (rtos (car p) 2))
  52. )


发表于 2017-8-1 10:26 | 显示全部楼层
论坛恢复了 高版能不能更新下最新的呀~
发表于 2017-11-6 08:03 来自手机 | 显示全部楼层
赞,希望更新下新版
发表于 2017-12-24 20:13 | 显示全部楼层
太高深了,消化不了这些知识点!但看到版主如此无私传授宝贵经验,我得赶紧再努力学习啊
发表于 2018-3-30 12:52 | 显示全部楼层
希望高飞鸟大神对高版本cad进行适配一下..
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-4-20 00:36 , Processed in 0.347229 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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