Prevent deleting "marked" cpoints/guides ? How?
-
I often use cpoints and guide lines in my components as references, grip points, rotation axes and so on... so I would like to prevent them to be deleted by accident.
Some time ago, I tried to make a tool that will delete the guides (cpoints, clines) on a selective manner.
I tried to use observers and Attribute Dictionaries, but I failed... it seems that observers are too buggy and don't behave as expected. Or, maybe my judgement was wrong at the time.Currently, the problem is that guides are deleted from entire model, so a cpoint inside a component can't be preserved. My thought was to have a tool that will create cpoints/guides and add a dictionary entry to them, like a label. Then, a observer that will prevent deleting the "marked" guides.
Any ideas/suggestions ? -
You can't prevent an object from being erased. You might be able to recreate it, if you manage to get any info on the erased entity (which is usually garbage by the time the oberser reports it), but you will very likely end up interfering with some other operation.
Safer and easier might be to create a custom Erase Guides function that will omit your protected guides.
It would be a useful tool, as I've also experience your frustration many time myself.
You could use attributes on each entity, or you can use attributes on a layer. Both options would be useful.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement