Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lisp calling function

2 REPLIES 2
Reply
Message 1 of 3
GeryKnee
217 Views, 2 Replies

lisp calling function

 


(defun fReSetOsM ( )
   (setvar "osmode" 0 )
   (princ)
)
(defun fAddOsMode ( value )
   (setvar "osmode" (logand (logior (getvar "osmode") value) 16383))
   (princ)
)

 

commands az and ac are working


(defun C:az ();;set osmod to 0
   (fReSetOsM )
)
(defun C:ae ();;add to osmod , endP
   (fAddOsMode 001 )
)

 

 

Where is the wrong in the syntax of command ace that is not working?


(defun C:ace ();;add to osmod , Circle , endP
   (fReSetOsM )
   (fAddOsMode 002 )
   (fAddOsMode 001 )
   (fReSetOsM )
)

2 REPLIES 2
Message 2 of 3
hmsilva
in reply to: GeryKnee

Try

 

(defun C:ace ();;add to osmod , Circle , endP
   (fReSetOsM )
   (fAddOsMode (+ 001 002))
   (fReSetOsM )
)

 EDIT: if 'Circle' is Center should be 004 instead of 002, 002 is for midpoint.

 

Henrique

EESignature

Message 3 of 3
Kent1Cooper
in reply to: GeryKnee


@GeryKnee wrote:

.... 

Where is the wrong in the syntax of command ace that is not working?


(defun C:ace ();;add to osmod , Circle , endP
   (fReSetOsM )
   (fAddOsMode 002 )
   (fAddOsMode 001 )
   (fReSetOsM )
)


Could it be simply that it includes (fReSetOsM) at the end?  Whatever comes before that is undone by that.

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost