在autocad2002中能取消鼠标双击弹出的缺省属性框吗?
我用lsp语句,可以把自己的函数加入到鼠标双击的事件中了,但是运行完自己的函数后,总是自动弹出原来缺省的属性框,不知道怎么取消,我只想运行自己的函数,不想再弹出缺省的属性对话框,请指教,谢谢! 雪山飞狐_lzh 发表于 2004-9-17 09:00把acdblclkedit.arx卸载掉
高版本已经没有这个arx了。用sendkey 发送ESC也还是会闪烁退掉默认对话框,不是最优解,用voto,这个在文档锁定模式下,C#才有。lisp没法调用,目前都没有好的办法来解决这个问题。 masterlong 发表于 2004-9-17 11:08
这是论坛里的一个范例文件,找不到原贴,拷贝在这里了
高版本不适用了,这写个arx都不存在,若不屏蔽原有的双击,双击对象时就会调用原有的命令,最好的办法是10#楼的重定义原有命令。 你应该是装了扩展工具后将双击属性开关打开了
dcprops off 那我怎么关闭呢?扩展工具是需要的,肯定不能卸载的啊 这个应该跟et工具无关,关不掉的 把acdblclkedit.arx卸载掉 厉害,这你也知道.
请问如何用lsp语句,可以把自己的函数加入到鼠标双击的事件中 如果跟et有关,怎么关闭,我的帖子不是已经有了吗?
如果无关,那就在你的程序里加(arxunload "acdblclkedit.arx" nil) 这是论坛里的一个范例文件,找不到原贴,拷贝在这里了
(defun jb:beginDoubleClick (reactorObject Listofsomething / point obj owner ownerobj command-list cmd gripset)<BR>;;; added for error in 2004 - point returned from outside a<BR>;;; paperspace viewport throws an error.<BR>(if (vl-catch-all-error-p (vl-catch-all-apply 'trans (list (car Listofsomething) 0 1)))<BR> (princ "PaperSpace")<BR> (progn<BR> (setq cmd "_.PROPERTIES" ; command default<BR> point Listofsomething<BR> obj (car (nentselp (trans (car point) 0 1)))<BR> owner (car (cadddr (nentselp (trans (car point) 0 1))))<BR> gripset (cadr (ssgetfirst))<BR> doc (vlax-get (vlax-get-acad-object) "activedocument")<BR> )
(if obj<BR> (progn<BR>; this statement will determine if the object<BR>; clicked over is an insert or not<BR> (cond<BR> (owner (setq ownerobj (strcase (vlax-get (vlax-ename->vla-object owner) "objectname"))))<BR> (T (setq ownerobj (strcase (vlax-get (vlax-ename->vla-object obj) "objectname"))))<BR> )
;Now set up your commands for the appropriate object<BR>; Object Command<BR>;(cons "ACDBBLOCKREFERENCE" "_.REFEDIT ")<BR> (setq command-list<BR> (list (cons "ACDBBLOCKREFERENCE" "_.REFEDIT")<BR> (cons "ACDBATTRIBUTE" "_.ATTEDIT")<BR> (cons "ACDBMTEXT" "_.DDEDIT")<BR> (cons "ACDBTEXT" "_.DDEDIT")<BR> (cons "ACDBROTATEDDIMENSION" "_.DDEDIT")<BR> (cons "ACDBALIGNEDDIMENSION" "_.DDEDIT")<BR> (cons "ACDBORDINATEDIMENSION" "_.DDEDIT")<BR> (cons "ACDBDIAMETRICDIMENSION" "_.DDEDIT")<BR> (cons "ACDBRADIALDIMENSION" "_.DDEDIT")<BR> (cons "ACDB2LINEANGULARDIMENSION" "_.DDEDIT")<BR> (cons "ACDBMLINE" "_.MLEDIT")<BR> (cons "ACDBATTRIBUTEDEFINITION" "_.DDEDIT")<BR> (cons "ACDBHATCH" "_.HATCHEDIT")<BR> (cons "ACDBRASTERIMAGE" "_.IMAGEADJUST")<BR> (cons "AECDBWALL" "_.PROPERTIES")<BR> (cons "AECDBDOOR" "_.PROPERTYDATAEDIT")<BR> (cons "AECDBWINDOW" "_.PROPERTIES")<BR> (cons "AECDBWINDOWASSEMBLY" "_.PROPERTIES")<BR> (cons "AECDBCURTAINWALLLAYOUT" "_.PROPERTIES")<BR> (cons "AECDBSPACE" "_.PROPERTYDATAEDIT")<BR> (cons "AECDBSTAIR" "_.PROPERTIES")<BR> (cons "AECDBRAILING" "_.PROPERTIES")<BR> (cons "AECDBMVBLOCKREF" "_.PROPERTIES")<BR> (cons "AECDBOPENING" "_.PROPERTIES")<BR> (cons "AECDBCEILINGGRID" "_.PROPERTIES")<BR> (cons "AECDBCOLUMNGRID" "_.PROPERTIES")<BR> (cons "AECDBSLAB" "_.PROPERTIES")<BR> (cons "AECSDBMEMBER" "_.PROPERTIES")<BR> (cons "AECDBMASSELEM" "_.PROPERTIES")<BR> (cons "AECDBROOF" "_.PROPERTIES")<BR> (cons "AECDBROOFSLAB" "_.PROPERTIES")<BR> (cons "AECDBCAMERA" "_.PROPERTIES")<BR> (cons "AECDBSCHEDULETABLE" "_.PROPERTIES")<BR> )<BR> )
;;; get the command<BR> (foreach x command-list<BR> (if (= (car x) ownerobj) (setq cmd(cdr x)))<BR> )
;;; make adjustment to command<BR> (cond<BR> ((= cmd "_.REFEDIT") (setq cmd "_.refedit (princ (cdr (nentselp (trans(car point)0 1)))) "))<BR> ((= cmd "_.ATTEDIT") (setq cmd "_.attedit (princ obj) "))<BR> ((= cmd "_.EATTEDIT") (setq cmd "_.eattedit (princ obj) "))<BR> (t (setq cmd(strcat cmd " ")))<BR> )<BR> (vla-sendcommand doc cmd)<BR> );;progn<BR> );;if<BR> );;progn<BR>);;if<BR>(princ)<BR>);;_ end of jb:beginDoubleClick _ ;;
;<BR>;<BR>;
(defun jb:LoadDoublClickReactor (/)<BR>;=;(if (/= (type jbDoubleClickReactor) 'VLR-MOUSE-REACTOR)<BR>;=; (setq jbDoubleClickReactor<BR>;=; (VLR-Mouse-Reactor nil '((:VLR-beginDoubleClick . jb:beginDoubleClick))) ;_ end of vlr-editor-reactor<BR>;=; )<BR>;=;)
(setq jbDoubleClickReactor<BR> (VLR-Mouse-Reactor nil '((:VLR-beginDoubleClick . jb:beginDoubleClick))) ;_ end of vlr-editor-reactor<BR>)
(if (not (vlr-added-p jbDoubleClickReactor)) (vlr-add jbDoubleClickReactor))<BR>;;; Unload acdblclkedit.arx in favor of jb's Expanded Double Click editing!<BR>(if (member "acdblclkedit.arx" (arx)) (arxunload "acdblclkedit.arx" nil))<BR>(princ)<BR>);;_ end of jb:LoadDoublClickReactor _ ;;
(progn (jb:LoadDoublClickReactor) (princ)) 原贴
<A href="http://discussion.autodesk.com/thread.jspa?messageID=2095286" target="_blank" >http://discussion.autodesk.com/thread.jspa?messageID=2095286</A> 这里还有一个范例,因为我没有什么用,不知你有没有用?;;来源:INTERNET
;;作者:ZOLTAN
;;
;;适用于mtext
(Command "_.UNDEFINE" "MTEDIT" )
(Defun C:MTEDIT ( / enPick )
(If (Cadr (SSGetFirst)) ;is MText already selected
(SetQ enPick (SSName (SSGet ":S") 0) ) ;user double-clicked
(SetQ enPick (Car (EntSel "\nSelect an MTEXT object: ")) ) ;user started MTEDIT command
)
(If enPick
(If (And (= (Cdr (Assoc 0 (EntGet enPick))) "MTEXT") ;validate my object
(GetXData enPick "QuickBag_Note")
)
(QB_EditNote enPick ) ;my own editor
(MTEDIT enPick ) ;normal MTEXT editor
)
)
(TerPri )
(Prin1 )
)
;
;;适用于属性块
(Command "_.UNDEFINE" "EATTEDIT" )
(Defun C:EATTEDIT ( / enPick bLoop )
(SetQ bLoop T )
(While bLoop
(If (SetQ enPick (Car (EntSel "\nSelect a Block: ")) )
(If (= (Cdr (Assoc 0 (EntGet enPick))) "INSERT") ;validate that object is a block
(If (= (Cdr (Assoc 66 (EntGet enPick))) 1) ;validate that the block has attributes
(ProgN
(If (GetXData enPick "QuickBag_KeyNote") ;validate that the block is mine.
(QB_EditKeyNote enPick ) ;my own editor
(Command ".ACAD_EAttedit.EATTEDIT" enPick ) ;normal EATTEDIT editor
)
(SetQ bLoop nil) ;get out of the loop
)
(PrinC "\nThe selected block has no editable attributes." )
)
)
(PrinC "\nError selecting entity." )
)
)
(TerPri )
(Prin1 )
)
;
;;一般图元对象
(Command "_.UNDEFINE" "PROPERTIES" )
(Defun C:PROPERTIES ( / psPick enPick )
(If (SetQ psPick (Cadr (SSGetFirst))) ;is object already selected
(ProgN
(SetQ enPick (SSName psPick 0) )
(If (GetXData enPick "QuickBag") ;validate my object
(QB_Edit enPick ) ;my own editor
(Command ".ACAD_OPM.PROPERTIES" ) ;open properties window
)
)
(Command ".ACAD_OPM.PROPERTIES" ) ;user started PROPERTIES command
)
(TerPri )
(Prin1 )
)