Original Tip Date: Jun. 17, 2003
AskInga Tip #292
Further discussion - communities.bentley.com/.../410504
I think you need to modify LockEntry. When Dgnlib levels/textstyles/dimensions are used there is usually a flag set that this item originally was from library so there are some limitations.
Oto, no you can't delete one supplied by a DGNLib. However, a local copy is made in the DGN and I need to remove that copy as it is in conflict with the DGNLib. I got an error indicating that it's locked. I'm not sure why the local style is locked, but assume it's because data is relying on it.
Do you know of a way to unlock the style in MicroStation SS3 using VBA?
My original goal is to bring text back to compliance with the DGNLib styles. On occasion, deleting or updating the local style does not work because it is locked.
My VBA workflow is to create a temp set of text styles in my DGNLib. I then programmatically move the text to those styles, then delete the primary styles. This typically "refreshes" the style list from the DGNLib, but sometimes gets caught on a locked style. My code then puts the elements back into the primary styles.
Any help would be appreciated!
You can't delete Textstyle which is attached from library.
I know this post was written quite a while ago for V8. I'm running MS V8i SS3 and in VBA, run into run-time error 2147221504 (80040000): The TextStyle is locked and cannot be modified.
This is with the VBA line:
I've tried the keyin "textstyle unlock [textstyle_name]" as above, but it looks like that doesn't apply to MS V8i SS3. I get "Unknown key-in or command.
Any ideas on how I can unlock a text style using VBA in this case?