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

expire date for a lisp function

24 REPLIES 24
SOLVED
Reply
Message 1 of 25
aqdam1978
4250 Views, 24 Replies

expire date for a lisp function

Hi friends,

 

I want to define en expiration date in registry, after that date the some LISP programs does not allow to run.

I think that suitable commands are SetEnv and GetEnv.

define a ExpDt variable that contains Expiry Date as a string.

and add some statements inside of the LISP program to call this variable and check it with today's date.

 

I should define once time in autocad:

(setenv "expdt" "130101"); YYMMDD date for validation period (2013.01.01)

 

and check this every time that a lisp program should be execeute:

(getenv "expdt") ; if today's date(with YYMMDD format) ">" expdt then lisp program doen not allow to run and should be halted.

for e.g. on 2013.02.28: "130228" > "130101" ==> so the lisp function should be halted and will not work!

(without any alert or message)


a sample list function: (how can implemente on this lisp function?)

 

(defun c:3()
(setq w t)
(while w
(setq a (getpoint "\npick point:"))
(setq p1 (list (- (car a) 0.5)(- (cadr a) 0.5)))
(setq p2 (list (+(car a) 0.5)(+(cadr a) 0.5)))
(command "erase" "w" p1 p2 "")
(command "INSERT" "*3" a "" "" "0")
)
(if (= a nil)(setq w nil))
)

 

 

so, does anybody know how can implemete this idea in LISP function?

 

Thank you in advance.

 

 

24 REPLIES 24
Message 21 of 25


@tranminhthong0993 wrote:

It's just that I want to limit the time when I share it with my team members, but I can not insert your code time. 


Can you put it in some shared location [server, cloud] for that limited time period, and then remove it?  Unless someone else copied it to a location of their own, instead of just loading it from that location, they wouldn't be able to load it any more, once you remove it from there.

Kent Cooper, AIA
Message 22 of 25

I tried to do this with Google drive but it didn't work.

tranminhthong0993_0-1655774153925.png

With unstick "Viewers and commenters can see the option to download, print, and copy", they can load successfully as shown in AutoCAD, but not read the file as not enter the command with this. (I think the file if be read, can be copied or opened) 

 

It would be nice if you can introduce me to some ways... Thanks in advance.

Message 23 of 25

Can someone help me ...

Message 24 of 25
pendean
in reply to: tranminhthong0993


@tranminhthong0993 wrote:

Can someone help me ...


pendean_0-1655827923593.png

 

Message 25 of 25
tranminhthong0993
in reply to: pendean

Thanks for your reply 🙂

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

Post to forums  

Autodesk Design & Make Report

”Boost