the-trooper Posted August 26, 2009 Author Share Posted August 26, 2009 If it was invisibility you were looking for:*couldn't resist* No problem, this is good to know, also. But as for undeletable.... hmm, thats a bit trickier. Undeletable, uneditable, unmovable. Maybe, locked, is a better way of saying it. Quote Link to comment Share on other sites More sharing options...
alanjt Posted August 26, 2009 Share Posted August 26, 2009 what about placing it on a locked layer, then just have a command reactor that checks to make sure layer is locked at beginning of command. vlr-command-reactor and vlr-lispWillStart could do the trick Quote Link to comment Share on other sites More sharing options...
Glen Smith Posted August 26, 2009 Share Posted August 26, 2009 How secure do you want this to be? Anything that the Brilliant minds (I'm not part of that group) here come up with - unless it somehow has a password protection - would be able to be removed by a sufficiently smart and or motivated cad operator. Heck they might even wind up here on the board looking for a way to delete a pesky object (leaving out the fact that it is a copyright / watermark type of thing). If you can put it on/in the drawing, eventually it can be removed from the drawing - it just depends on how much work you want to cause your opponent. Glen Quote Link to comment Share on other sites More sharing options...
ReMark Posted August 26, 2009 Share Posted August 26, 2009 Judging by the number of requests we see here about getting rid of normal AutoCAD entities I would say that chances are the average user is not going to have a clue. Quote Link to comment Share on other sites More sharing options...
alanjt Posted August 26, 2009 Share Posted August 26, 2009 just out of curiosity, what's so important that you must protect it like the holy grail? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 26, 2009 Share Posted August 26, 2009 Something like this Alan - nice idea: (defun c:water ( ) (vl-load-com) (if (not *wMark*) (progn (setq *wMark* (vlr-command-reactor nil (list (cons :vlr-commandWillStart 'Lock)))) (if (not (tblsearch "LAYER" "WMark")) (vla-add (setq *lay (vla-get-layers (vla-get-ActiveDocument (vlax-get-acad-object)))) "WMark")) (princ "\n** Reactor Initiated **")) (princ "\n** Reactor Already Running **")) (princ)) (defun Lock (Reac Args) (if (not (wcmatch (strcase (car Args)) "*ZOOM*,*PAN*")) (vla-put-Lock (vla-item *lay "WMark") :vlax-true)) (princ)) (defun c:drain ( ) (vl-load-com) (if (and *wMark* (vlr-added-p *wMark*)) (progn (vlr-remove *wMark*) (setq *wMark* nil *lay nil) (princ "\n** Reactor Deactivated **")) (princ "\n** Reactor Not Running **")) (princ)) Quote Link to comment Share on other sites More sharing options...
alanjt Posted August 26, 2009 Share Posted August 26, 2009 precisely what i had in mind. only thought i could come up with. sorry i didn't have a chance to hash something out, glad you took the initiative. Something like this Alan - nice idea: (defun c:water ( ) (vl-load-com) (if (not *wMark*) (progn (setq *wMark* (vlr-command-reactor nil (list (cons :vlr-commandWillStart 'Lock)))) (if (not (tblsearch "LAYER" "WMark")) (vla-add (setq *lay (vla-get-layers (vla-get-ActiveDocument (vlax-get-acad-object)))) "WMark")) (princ "\n** Reactor Initiated **")) (princ "\n** Reactor Already Running **")) (princ)) (defun Lock (Reac Args) (if (not (wcmatch (strcase (car Args)) "*ZOOM*,*PAN*")) (vla-put-Lock (vla-item *lay "WMark") :vlax-true)) (princ)) (defun c:drain ( ) (vl-load-com) (if (and *wMark* (vlr-added-p *wMark*)) (progn (vlr-remove *wMark*) (setq *wMark* nil *lay nil) (princ "\n** Reactor Deactivated **")) (princ "\n** Reactor Not Running **")) (princ)) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 26, 2009 Share Posted August 26, 2009 Was bored, what can I say... :wink: Quote Link to comment Share on other sites More sharing options...
ronjonp Posted August 26, 2009 Share Posted August 26, 2009 Here is another idea: http://www.theswamp.org/index.php?topic=6463.msg79131#msg79131 Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 26, 2009 Share Posted August 26, 2009 Superb Ron, thanks for that link Quote Link to comment Share on other sites More sharing options...
alanjt Posted August 26, 2009 Share Posted August 26, 2009 Here is another idea: http://www.theswamp.org/index.php?topic=6463.msg79131#msg79131 interesting. vlr-editor-reactor is a new one to me. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 26, 2009 Share Posted August 26, 2009 interesting.vlr-editor-reactor is a new one to me. yeah, I've never really used it either - but after investigating the amount of Callbacks for it, I think I will from now on! Quote Link to comment Share on other sites More sharing options...
the-trooper Posted August 27, 2009 Author Share Posted August 27, 2009 How secure do you want this to be? Anything that the Brilliant minds (I'm not part of that group) here come up with - unless it somehow has a password protection - would be able to be removed by a sufficiently smart and or motivated cad operator. I know, but considering how hard it is to create such object, and knowing how "much" average operator knows, i think very, VERY, few of them would be able to do that. Half of them don't even know how to appload a lisp... Quote Link to comment Share on other sites More sharing options...
the-trooper Posted August 27, 2009 Author Share Posted August 27, 2009 just out of curiosity, what's so important that you must protect it like the holy grail? Well, our dynamic blocks started appearing in other firms drawings. We send drawings to our associates, so, if they want to use them, one tiny, itsy bitsy line of text saying who and when made that block is in order. Right? Nothing that would prevent from using it, or even get in the way of normal work. Quote Link to comment Share on other sites More sharing options...
the-trooper Posted August 27, 2009 Author Share Posted August 27, 2009 Something like this Alan - nice idea: (defun c:water ( ) Lee Mac, this is fantastic!!! Exactly what i wanted! Thanks very, very much! Just one more thing is it possible to make "Wmark" layer unplottable by default? You wouldn't believe how many people are unaware this is possible, and i don't want to make blocks unusable. Quote Link to comment Share on other sites More sharing options...
the-trooper Posted August 27, 2009 Author Share Posted August 27, 2009 Here is another idea: http://www.theswamp.org/index.php?topic=6463.msg79131#msg79131 Don't know if you noticed, "Keep" lisp in this thread makes objects undeletable only until the block is opened for editing. Then you can do what you want whit it. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 27, 2009 Share Posted August 27, 2009 Lee Mac, this is fantastic!!! Exactly what i wanted! Thanks very, very much! Just one more thing is it possible to make "Wmark" layer unplottable by default? You wouldn't believe how many people are unaware this is possible, and i don't want to make blocks unusable. Thanks, but it was Alan's idea... I still think the Keep.lsp is a more elegant solution, but as you say, I can't guarantee its security in a block. btw, bear in mind that the reactor will only need to be called once in a drawing session, and also, that once the drawing is closed the reactor will be deactivated, unless made persistent. Here it is with the layer made unplottable: [b][color=RED]([/color][/b][b][color=BLUE]defun[/color][/b] c:water [b][color=RED]([/color][/b] [b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]vl-load-com[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]if[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]not[/color][/b] *wMark*[b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]progn[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]setq[/color][/b] *wMark* [b][color=RED]([/color][/b][b][color=BLUE]vlr-command-reactor[/color][/b] [b][color=BLUE]nil[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]list[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]cons[/color][/b] [color=Blue][b]:vlr-commandWillStart[/b][/color] [b][color=DARKRED]'[/color][/b]Lock[b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]if[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]not[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]tblsearch[/color][/b] [b][color=#ff00ff]"LAYER"[/color][/b] [b][color=#ff00ff]"WMark"[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]vla-put-plottable[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]vla-add[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]setq[/color][/b] *lay [b][color=RED]([/color][/b][b][color=BLUE]vla-get-layers[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]vla-get-ActiveDocument[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]vlax-get-acad-object[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=#ff00ff]"WMark"[/color][/b][b][color=RED])[/color][/b] [b][color=Blue]:vlax-false[/color][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]princ[/color][/b] [b][color=#ff00ff]"\n** Reactor Initiated **"[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]princ[/color][/b] [b][color=#ff00ff]"\n** Reactor Already Running **"[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]princ[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]defun[/color][/b] Lock [b][color=RED]([/color][/b]Reac Args[b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]if[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]not[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]wcmatch[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]strcase[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]car[/color][/b] Args[b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=#ff00ff]"*ZOOM*,*PAN*"[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]vla-put-Lock[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]vla-item[/color][/b] *lay [b][color=#ff00ff]"WMark"[/color][/b][b][color=RED])[/color][/b] [b][color=Blue]:vlax-true[/color][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]princ[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]defun[/color][/b] c:drain [b][color=RED]([/color][/b] [b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]vl-load-com[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]if[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]and[/color][/b] *wMark* [b][color=RED]([/color][/b][b][color=BLUE]vlr-added-p[/color][/b] *wMark*[b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]progn[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]vlr-remove[/color][/b] *wMark*[b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]setq[/color][/b] *wMark* [b][color=BLUE]nil[/color][/b] *lay [b][color=BLUE]nil[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]princ[/color][/b] [b][color=#ff00ff]"\n** Reactor Deactivated **"[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]princ[/color][/b] [b][color=#ff00ff]"\n** Reactor Not Running **"[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b][b][color=BLUE]princ[/color][/b][b][color=RED])[/color][/b][b][color=RED])[/color][/b] Quote Link to comment Share on other sites More sharing options...
the-trooper Posted August 27, 2009 Author Share Posted August 27, 2009 Thanks, but it was Alan's idea... Thanks to Alan, also! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 27, 2009 Share Posted August 27, 2009 The problem will be that the callback data associated with the reactor (if made persistent) will need to be loaded upon opening the drawing for the reactor to successfully function. Not quite sure how you are going to get around that one... Quote Link to comment Share on other sites More sharing options...
dbroada Posted August 27, 2009 Share Posted August 27, 2009 when you have come up with all your solutions can somebody upload a "watermarked" file. It would be fun seeing how secure it is. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.