I am filling values of Attributtes into title block using Code. I want no User can go and Update the value of Attribute.
Is it Possible to Lock the Attributes of the Title Block?
Actually I want to Set the value of these Attributes using Command "TITLEBLOCK".
My Actual Requirement is as:
The Command "EATTEDIT" should not work if fired from AutoCAD by any User.
I want automation everywhere. No manual thing should be Possible.
>> My Actual Requirement is as:
>> The Command "EATTEDIT" should not work
Then redefine the EATTEDIT-command or check the CommandWillStart event.
But what will you do if the user modifies the attributes in the property-window then?
So I think concentrating to just this command may not be the solution.
Maybe the most simple solution: what about setting the layer of your titleblocks to "locked" and just watch this layer is not unlocked by the user?
- alfred -
Ok if you'd like to get fancy how about you create an anonymous block!
Anonymous blocks aren't available for editing by the user (i.e. BEDIT won't list it). For this you create your BlockTableRecord in code as per usual, except you must set its name to "*U" before you add it to the BlockTable.
I'm not sure whether attributes will work with this, but it doesn't matter because with anonymouse blocks you won't need them. Instead you can programatically add any text you like to your anonymous block definition and the user won't be able to modify it at all.
You could be even more fancy by nesting an anonymous block inside of your normal title block.
You could even go further and add a hard reference pointer to the block reference from an XRecord so that it can't be erased.
Sounds simple heh? :~)