Sweety Posted September 15, 2010 Share Posted September 15, 2010 (edited) Is it possible to stick an entity in a dwg without being able to get rid of it? Thanks Edited September 15, 2010 by Sweety extra letter Quote Link to comment Share on other sites More sharing options...
ReMark Posted September 15, 2010 Share Posted September 15, 2010 You want to put something in a drawing and prohibit the user from deleting it? What is this mysterious "entity"? Quote Link to comment Share on other sites More sharing options...
David Bethel Posted September 15, 2010 Share Posted September 15, 2010 The paperspace viewport is the only thing that comes to mind. -David Quote Link to comment Share on other sites More sharing options...
Sweety Posted September 15, 2010 Author Share Posted September 15, 2010 Thanks guys. I mean any entity in general Text,Line,Circle.... Quote Link to comment Share on other sites More sharing options...
ReMark Posted September 15, 2010 Share Posted September 15, 2010 Paper space viewports can be deleted can't they? Quote Link to comment Share on other sites More sharing options...
Sweety Posted September 15, 2010 Author Share Posted September 15, 2010 Paper space viewports can be deleted can't they? Yes of course, If you turn off the layer that it's belond to, you can not select it to delete it. But viewport not my question . Thanks Quote Link to comment Share on other sites More sharing options...
Tiger Posted September 15, 2010 Share Posted September 15, 2010 Something like the Education Stamp? Since you're not really explaining what you are wanting with this, I'll assume that you want to protect your DWGs in some way - to that I say, only send drawings as PDFs. Quote Link to comment Share on other sites More sharing options...
David Bethel Posted September 15, 2010 Share Posted September 15, 2010 Using just the command line: Enter template file name or [. (for none)] :. Regenerating model. Command: tm TILEMODE Enter new value for TILEMODE : 0 Regenerating layout. Regenerating model. Command: e ERASE Select objects: all 2 found 1 was the paper space viewport. Select objects: Command: e ERASE Select objects: all 1 found 1 was the paper space viewport. Select objects: --- Starting in A2K, you can however select all layout tabs and the right click and delete the paperspace viewport. -David Quote Link to comment Share on other sites More sharing options...
ReMark Posted September 15, 2010 Share Posted September 15, 2010 What's the purpose? Is it just to prevent users from deleting or changing content? Quote Link to comment Share on other sites More sharing options...
Sweety Posted September 15, 2010 Author Share Posted September 15, 2010 What's the purpose? Is it just to prevent users from deleting or changing content? exactly dear remark. That's what I am looking for. Quote Link to comment Share on other sites More sharing options...
ReMark Posted September 15, 2010 Share Posted September 15, 2010 If a human can conceive of the idea another human can find a way around it. The only entities I've seen in a drawing that, to me anyway, are impossible to get rid of are geomarkers. Quote Link to comment Share on other sites More sharing options...
Tiger Posted September 15, 2010 Share Posted September 15, 2010 exactly dear remark. That's what I am looking for. Again; PDF. Quote Link to comment Share on other sites More sharing options...
Sweety Posted September 15, 2010 Author Share Posted September 15, 2010 Again; PDF. Dear Tiger, PDF would save the whole dwg, and I am talking about one object in a dwg. Quote Link to comment Share on other sites More sharing options...
Se7en Posted September 15, 2010 Share Posted September 15, 2010 Off topic: paerspace itself is a viewport. @David using lisp: layer zero too. I knew a guy who deleted layer zero--with VB i think--on a production drawing once. *lol* On topic: Maybe make it invisible (there is a visibility property)? But i dont think this is what you are looking for. Quote Link to comment Share on other sites More sharing options...
David Bethel Posted September 15, 2010 Share Posted September 15, 2010 @David using lisp: layer zero too. I knew a guy who deleted layer zero--with VB i think--on a production drawing once. *lol* OMG! I had never heard of that! -David Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 15, 2010 Share Posted September 15, 2010 It can be done through the use of a reactor, but this will only persist throughout the session: (defun c:LockObjects ( / ss ) (vl-load-com) ;; © Lee Mac 2010 (if (setq ss (ssget)) ( (lambda ( i / e hand ) (while (setq e (ssname ss (setq i (1+ i)))) (if (not (vl-position (setq hand (vla-get-Handle (vlax-ename->vla-object e)) ) *locked* ) ) (setq *locked* (cons hand *locked*)) ) ) (if (not (vl-some (function (lambda ( reactor ) (eq "ObjectLock" (vlr-data reactor)) ) ) (cdar (vlr-reactors :vlr-editor-reactor)) ) ) (vlr-editor-reactor "ObjectLock" (list (cons :vlr-commandEnded 'ObjectLockCallBack) ) ) ) ) -1 ) ) (princ) ) (defun c:UnLockObjects ( / ss ) (vl-load-com) ;; © Lee Mac 2010 (if *locked* (if (setq ss (ssget)) ( (lambda ( i / e hand ) (while (setq e (ssname ss (setq i (1+ i)))) (if (vl-position (setq hand (vla-get-Handle (vlax-ename->vla-object e)) ) *locked* ) (setq *locked* (vl-remove hand *locked*)) ) ) ) -1 ) ) (princ "\n** No Objects Locked **") ) (princ) ) (defun c:DisableLock ( / reactor ) (vl-load-com) ;; © Lee Mac 2010 (if (setq reactor (vl-some (function (lambda ( reactor ) (if (eq "ObjectLock" (vlr-data reactor)) reactor) ) ) (cdar (vlr-reactors :vlr-editor-reactor)) ) ) (vlr-remove reactor) (princ "\n** Object Lock not Running **") ) (princ) ) (defun ObjectLockCallBack ( reactor arguments ) (if (wcmatch (strcase (car arguments)) "ERASE,EXPLODE") (mapcar (function (lambda ( handle ) (or (entget (handent handle)) (entdel (handent handle))) ) ) *locked* ) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
alanjt Posted September 15, 2010 Share Posted September 15, 2010 I know this sounds crazy, but you could just educate users to NOT delete something if on a locked or specific layer. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 15, 2010 Share Posted September 15, 2010 I know this sounds crazy, but you could just educate users to NOT delete something if on a locked or specific layer. lol that would be too simple Alan :wink: Quote Link to comment Share on other sites More sharing options...
alanjt Posted September 15, 2010 Share Posted September 15, 2010 ...clearly... Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 15, 2010 Share Posted September 15, 2010 ...clearly... Still, it doesn't hurt to demonstrate what one can do if one wanted to. 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.