can not able to load this lisp - sometimes it works sometimes it doesnt

can not able to load this lisp - sometimes it works sometimes it doesnt

coolkris
Advocate Advocate
1,203 Views
7 Replies
Message 1 of 8

can not able to load this lisp - sometimes it works sometimes it doesnt

coolkris
Advocate
Advocate

Dear all,

 

the lisp attached I was using for long time. When I used this with vlide, this does not load and not working even apploaded manually. Please check someone. Whenever I open vlideide, the autocad does not work in any command.

 

Thanks

 

Krish

 

 

0 Likes
Accepted solutions (1)
1,204 Views
7 Replies
Replies (7)
Message 2 of 8

marko_ribar
Advisor
Advisor

This looks to me like you are sharing AutoCAD virus... There was in past "acad.lsp" virus thing, so just worinning - I haven't downloaded it and I won't do that...

Marko Ribar, d.i.a. (graduated engineer of architecture)
0 Likes
Message 3 of 8

coolkris
Advocate
Advocate

thats rude comment

0 Likes
Message 4 of 8

marko_ribar
Advisor
Advisor

No it's not rude comment - it's very thoughtful and careful...

Marko Ribar, d.i.a. (graduated engineer of architecture)
0 Likes
Message 5 of 8

devitg
Advisor
Advisor

I downloaded , no virus found with  .

please upload your sample.dwg where do you apply it 

0 Likes
Message 6 of 8

devitg
Advisor
Advisor

here it is. 

 

;**************************MODE MACRO FOR STATUS BAR******************************
(setvar "lunits" 2)
(defun-q s::startup (/ str1 str2 str3 str4 str5)
      (setq str1 "ds=$(getvar,dimscale);"
            str2 "lts=$(getvar,ltscale);"
            str3 "celt=$(getvar,celtscale);"                           
            str4 "mslt=$(getvar,msltscale);"
            str5 "pslt=$(getvar,psltscale);"
      )
      (setvar
	"modemacro" (strcat str1 str2 str3 str4 str5)
      (princ)
)
 (setq dsc (getvar "dimscale"))
 (autoload "TBRCALC" '("Te"))
); lost parentesis

there is not a AUTOLOAD defun .

other one , lost comment key ;

 

(cons "7" "Sheet"); first is color number - 
;   the the layers for that 
;color separated by acomma
0 Likes
Message 7 of 8

john.uhden
Mentor
Mentor
Accepted solution

Be careful when trying to use s::startup.

Other software you load may be trying to define it, and they may be using defun, not defun-q.  It depends on who defuns last, which you don't necessarily know.

I came up with this a number of years ago to deal with the potential problem...

(cond
   ((not S::STARTUP)
      (defun-q S::STARTUP ()(do_this)(do_that))
   )
   ((listp S::STARTUP)
      (setq S::STARTUP (append S::STARTUP '((do_this)(do_that))))
   )
   ((member (type S::STARTUP) '(SUBR USUBR))
      (eval
         (list 'defun-q 's::startup ()
            (list s::startup)        ;; NO QUOTE
           '(do_this)
           '(do_that)
         )
      )
   )
)

John F. Uhden

0 Likes
Message 8 of 8

Sea-Haven
Mentor
Mentor

Devitg there is not a AUTOLOAD defun .

 

Yes there is and the line of code is correct, I have about 20 of these in my startup lisp.

0 Likes