Jump to content

Time bound Lisp


viviancarvalho

Recommended Posts

Hi to all

 

Can a lisp can be time bound ? :unsure:

To be more specific i want a lisp, not to run after a certain date or time.

It could be sounding funny but i just want to know its possibilities.:?

 

Thanks & regards

Vivian.

Link to comment
Share on other sites

put something like this..

 

(if (< (rtos (getvar "cdate") 2 0) "20101215")
( ..... run routine)
(Alert "Contact pBe for Renewal")
)

 

I assume you meant "time bomb"? :)

Why would you do that? :lol:

Link to comment
Share on other sites

put something like this..

 

(if (< (rtos (getvar "cdate") 2 0) "20101215")
( ..... run routine)
(Alert "Contact pBe for Renewal")
)

 

I assume you "time bomb" :)

Why would you do that? :lol:

 

Thank you very much.

I know its a strange thing,but i have to do it. We are offloading one of our jobs fully to one of our sub contractors. I want them to maintain the same quality of our drawings, at the same time i dont want him to use it for himself.......:wink:

 

Regards

Vivian.

Link to comment
Share on other sites

Thank you very much.

I know its a strange thing,but i have to do it. We are offloading one of our jobs fully to one of our sub contractors. I want them to maintain the same quality of our drawings, at the same time i dont want him to use it for himself.......:wink:

 

Regards

Vivian.

 

Of course it would help if they cant see that part of the code

so compiled lisp is what you need

FAS or VLX

 

Good luck c",)

Link to comment
Share on other sites

Of course it would help if they cant see that part of the code

so compiled lisp is what you need

FAS or VLX

 

Good luck c",)

 

It is already a fas file but it would stay with him forever. That is why i want it to expire.

Link to comment
Share on other sites

If you don’t trust them have them sign an agreement. You might not be able to do what you want in lisp.

If they don’t have a full version of AutoCAD the program will not run.

If they are allowed to edit the cad files then they can copy the file and bypass any code.

I believe this topic has been posted before, try a search for the topic and you might find some helpful tips before spending time writing a lot of code.

Security codes and written agreements will only keep the honest crooks out, if there is a will there is a way.

Link to comment
Share on other sites

Why are you giving the sub contractor the lisp in the first place ? Are you just saving him time and money.

 

If its to do with drawing standards then make that part of the contract that they must draft to your standards without the lisp or buy yours.

 

Also been there done that had the phone call program won't work at a mates house. Ask the contractor for his serial number "_pkser" add that as well stops the date being reset to work and handing it to some else.

Edited by BIGAL
serial number
Link to comment
Share on other sites

  • 7 years later...

Sorry to bump this old thread. Where in the lisp do i need to post the code that pBe posted?

 

Can somebody be kind enough to put comments on that code so i can now what it does and how to put the so called expiration date?

Link to comment
Share on other sites

Put it at the very start of your lisp. If your not making a fas then your wasting your time.

 

; this is for two weeks from today year month day
(if (> (rtos (getvar "cdate") 2 0) "20180117")
(progn
(Alert "Contact pBe for Renewal")
(exit) ; exit lisp routine
)
(princ "\nOK")
)

Link to comment
Share on other sites

If you are at all concerned about them finding workarounds, there are lots of methods of making the time limit more difficult to get past.

You could set the program to delete or overwrite itself after the deadline, that way they can't spoof the time limit as easily unless they know ahead of time that it will behave that way.

Another method is for it to log the current date. In addition to a cutoff date, make the program refuse to run if it senses any time traveling (if the current date is earlier than any one of the past logged dates).

Link to comment
Share on other sites

Both (exit) and (quit) commands return the "; error: quit / exit abort" message by design. Add a small error trap to hide from user if desired.

Link to comment
Share on other sites

Like Kirby you would do some form of elaborate message before the (exit)

 

For a laugh just wait for sound, I will find better version.

 

(defun SpeakSapi ( s / sapi )
(if (eq (type s) 'STR) 
(progn 
(setq sapi (vlax-create-object "Sapi.SpVoice"))
(vlax-put sapi 'SynchronousSpeakTimeout 1)
(vlax-invoke-method sapi 'WaitUntilDone 0)
(vlax-invoke sapi "Speak" s 0)
(vlax-release-object sapi)
)))
(speaksapi "Welcome from BIG al the humour and respect you can expect here at Cad tutor")
(speaksapi "PLEASE PAY YOUR MONEY")
(speaksapi "I know you have wound the clock back" )
(speaksapi "Call me on 1234 5678 if you like the software")

Link to comment
Share on other sites

  • 7 months later...

Just add the check after the defun line at the start, particuarly if you autoload it at start up.

 

Even above it if you demand load it from say a menu.

Link to comment
Share on other sites

so it will look something like this?

 

(defun c:SAMPLE ()
(if (> (rtos (getvar "cdate") 2 0) "20180117")
(progn
(Alert "Contact pBe for Renewal")
(exit) ; exit lisp routine
)
(princ "\nOK")
)
	(<blah blah)
	
(princ)
)

Edited by SLW210
Changed Quote Tags to Code Tags
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...