In this session you will learn how to write Sub Functions in AutoLISP.
Пікірлер: 8
@cyberCADsolutions2 жыл бұрын
; Using Sub Functions in AutoLISP ; Program to calculate ncr value = n!/((n-r)!xr!) (defun c:ncr(/ n r nFact rFact nMrFact) (setq n 4 r 2 ) (setq nFact (getFact n)) (setq rFact (getFact r)) (setq nMrFact (getFact (- n r))) (setq ncr (/ nFact (* nMrFact rFact))) (alert (rtos ncr 2 2)) );end ; Subfunction to calculate the factorial value (defun getFact (i / counter fact) (setq counter i fact 1 ) (while (> counter 1) (setq fact (* fact counter)) (setq counter (1- counter)) );while fact );end
@soumitratewari4832 жыл бұрын
Thanks for the video. Please upload more 🙂
@cyberCADsolutions2 жыл бұрын
Thank you, I will. Please share.
@engHamdy072 жыл бұрын
Do you have a lisp to create a QR code immediately from AutoCAD by selecting a point in its UTM coordinates. The generated QR Code opens google maps and refer to the point location so that one can directly scan code and drive to it.
@karthikpandian65672 жыл бұрын
Very useful bro 🙏🙏
@cyberCADsolutions2 жыл бұрын
Thank you. Please share to your friends and colleagues.
@adityaadit2004 Жыл бұрын
Sir I am currently having this problem where I have a subfunction inside a function. When I load it into a new drawing with APPLOAD and trying to use the function, this error message appears saying (error no definition function ...). So I have to load it manually using VLIDE window everytime. How to fix it, sir? Thank you?