vba - Method called twice instead of single time -
i have trouble calling methods lisp command in autocad. using lisp file in autocad. when call macro name autocad calls method twice instead of single time.
in lisp file
(defun c:export_n() (setvar "cmdecho" 0) (command "-vbarun" "export_new") (princ) )
in calling lisp file form autocad:
openmacro = "export_n " & vbcr set newbutton = newtoolbar.addtoolbarbutton("", "export", "export", openmacro) smallbitmapname = apppath & "\" & "tool icon\mreport.bmp" largebitmapname = apppath & "\" & "tool icon\mreport.bmp" newbutton.setbitmaps smallbitmapname, largebitmapname
your macro includes space , carriage return. space enters command, , carriage return repeats command. remove 1 or other prevent command repeating.
Comments
Post a Comment