hnfsf 发表于 2015-6-11 07:27:35

老师说,这个可以顶,必须顶‘

vken7az2p 发表于 2015-6-12 06:18:18

真是太厉害了~谢谢您的提供分享~

masterlong 发表于 2015-6-13 18:33:55

本帖最后由 masterlong 于 2015-6-13 18:38 编辑

使用过程中发现问题报告

WINXP+CAD2004

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

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


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

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

程序如下:


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

masterlong 发表于 2015-6-13 18:44:24

我的电脑里加载的第三方函数库有

acetutil.arx ;;acet函数库
DocBar_2004.arx;;多文档工具
doslib16.arx;;doslib函数库
BladeR16.arx;;乱刀去教育戳
OpenDCL.16.arx;;opendcl运行支持

xyz002 发表于 2015-9-1 16:27:37

虽然不懂,但收藏了

greatvictory 发表于 2016-10-7 22:46:58

本帖最后由 greatvictory 于 2016-10-7 22:53 编辑

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

    ;;If there are entities nearby the cursor,then display the infomation
    ;;about the first one.
    (if      elist
      (progn
      (setq dat (entget (car elist)))
      (strcat txt "\nThe type of aperture Entity is: " (test dat p)))
      )
      txt
    )
)

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

(defun test (e p)
(strcat (cdr (assoc 1 e)) (rtos (car p) 2))
)

lxg3443 发表于 2017-8-1 10:26:56

论坛恢复了 高版能不能更新下最新的呀~

那夕阳已醉 发表于 2017-11-6 08:03:40

赞,希望更新下新版

BaoWSE 发表于 2017-12-24 20:13:37

太高深了,消化不了这些知识点!但看到版主如此无私传授宝贵经验,我得赶紧再努力学习啊

524917100 发表于 2018-3-30 12:52:41

希望高飞鸟大神对高版本cad进行适配一下..
页: 8 9 10 11 12 13 14 15 16 17 [18] 19 20
查看完整版本: 【飞鸟集】心随我动--为LISP定制的动态输入,拖拉和动态信息函数(更新至20130731)