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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -