Jump to content
the-trooper

Creating undeletable object - possible?

Recommended Posts

the-trooper

Hello everyone.

 

Is it possible to create an undeletable object (line or text) in a dwg? I need something that would serve as "trademark" on DEFPOINTS, in our blocks sent to others.

 

Thanks in advance!

Share this post


Link to post
Share on other sites
ReMark

This sounds like something that might possibly be doable using Visual LISP but I'm not a programmer so I cannot say with 100% certainty that it can be done. I've read where someone has used Visual LISP to make objects visible or invisible by resetting their visibility property. Perhaps there is a 'lock' property? Someone like Lee Mac might be able to provide you with a more definitive answer.

Share this post


Link to post
Share on other sites
the-trooper

Thanks, ill contact Lee Mac.

In meantime, admins, if this thread is in a wrong place, please move it to the right one :thumbsup:

Share this post


Link to post
Share on other sites
Lee Mac

How about switching off the Visibility of an Object?

 

AFAIK this makes it undetectable :)

Share this post


Link to post
Share on other sites
alanjt
How about switching off the Visibility of an Object?

 

AFAIK this makes it undetectable :)

visibility is the only real option.

however, the little light bulb at the bottom corner will show that something's visibility is 'turned off' and can easily be turned back on.

especially problematic if these functions are actually utilized by the user.

with the way C3D styles ignore layers, i use the isolate and hide function at times.

 

just a little food for thought.

 

.......can an object reactor prevent erasing?

Share this post


Link to post
Share on other sites
Lee Mac

Obviously, if you made a Block Invisible - it would still show up in the Block Editor, so an object would be better.

 

The Object would still appear in the drawing database, but would be "un-selectable" by the user (and would only be able to be accessed by other means).

Share this post


Link to post
Share on other sites
Lee Mac
however, the little light bulb at the bottom corner will show that something's visibility is 'turned off' and can easily be turned back on.

 

 

Light bulb? :huh:

Share this post


Link to post
Share on other sites
the-trooper

You're talking about visibility state in block editor?

Share this post


Link to post
Share on other sites
alanjt
Light bulb? :huh:

bottom right corner:

bulb.JPG

Share this post


Link to post
Share on other sites
alanjt

i take it back, it doesn't detect it.

(vla-put-visible (vlax-ename->vla-object (car (entsel))) :vlax-false)

will do exactly what you want.

Share this post


Link to post
Share on other sites
the-trooper

You lost me guys... :(

Share this post


Link to post
Share on other sites
Lee Mac

Don't think I have that light bulb in ACAD 2010. :unsure:

Share this post


Link to post
Share on other sites
Lee Mac
You lost me guys... :(

 

What would you like to be made invisible?

Share this post


Link to post
Share on other sites
the-trooper
What would you like to be made invisible?

 

One line of text, doesn't even need to be text, i can "write" it with lines/polylines.

 

But it must be visible, on screen. On defpoints, so others can plot normally.

 

Should be undeletable.

Share this post


Link to post
Share on other sites
ReMark

I thought we were trying to lock an object?

 

CADTutor himself suggested the use of a 'read-only' xref to a similar question. That assumes the person that the drawing is sent to does not know how to reset the read-only attribute. Do most people know how to do that these days? I do but then I grew up with DOS.

Share this post


Link to post
Share on other sites
dbroada
bottom right corner:

no, never seen that either.:cry:

Share this post


Link to post
Share on other sites
Lee Mac

If it was invisibility you were looking for:

 

(defun c:invis (/ ent)
 (vl-load-com)
 (if (setq ent (car (entsel "\nSelect Object: ")))
   (vla-put-Visible
     (vlax-ename->vla-object ent) :vlax-false))
 (princ))

(defun c:vis (/ ss)
 (vl-load-com)
 (if (setq ss (ssget "_X"))
   (mapcar
     (function
       (lambda (x)
         (vla-put-visible
           (vlax-ename->vla-object x) :vlax-true)))
     (mapcar 'cadr (ssnamex ss))))
 (princ))

 

*couldn't resist*

 

But as for undeletable.... hmm, thats a bit trickier.

 

Obviously a locked layer is the simple answer, but that assumes they don't know how to unlock a layer.. which is pretty obvious.

 

Perhaps a persistent object reactor could do the trick, but I've never done anything like that, so we are stabbing in the dark a bit here...

Share this post


Link to post
Share on other sites
ReMark

Stabbing in the dark. That sounds like a job for Super Mac! I bet you could figure it out.

Share this post


Link to post
Share on other sites
mdbdesign

How about something like "Educational stamp" but in visible and non plot-able version?

Share this post


Link to post
Share on other sites
Lee Mac
How about something like "Educational stamp" but in visible and non plot-able version?

 

I think the Educational Stamp is a lot deeper than LISP :geek:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×