By Adam Nagy
In case of some assemblies, e.g. the ones created by Design Accelerator, the name of the document or the occurrances in it cannot be changed: you get message "Request Rename Component cannot be run on document Synchronous Belts"
Design Accelerator does set the Document.DisabledCommandTypes to kNonShapeEditCmdType + kShapeEditCmdType, which is 32 + 1 = 33, and that seems to be the thing that disables those types of changes.
If you test the effect of the various CommandTypesEnum values concerning the above changes then this is what you get:
Public Sub SetDisabledCommandTypes() ' Type / Can you rename occurrences? / Can you rename document? ' kEditMaskCmdType = 57 (&H39) / No / No ' - kNonShapeEditCmdType (32) ' - kUpdateWithReferencesCmdType (16) ' - kFilePropertyEditCmdType (8) ' - kShapeEditCmdType (1) ' kFileOperationsCmdType = 4 / Yes / Yes ' kFilePropertyEditCmdType = 8 / Yes / Yes ' kNonShapeEditCmdType = 32 (&H20) / No / No ' kQueryOnlyCmdType = 2 / Yes / Yes ' kReferencesChangeCmdType = 64 (&H40) / Yes / Yes ' kSchemaChangeCmdType = 128 (&H80) / Yes / Yes ' kShapeEditCmdType = 1 / Yes / Yes ' kUpdateWithReferencesCmdType = 16 (&H10) / Yes / Yes ' You can test the effect of the various enum values here ThisApplication.ActiveDocument.DisabledCommandTypes = _ kNonShapeEditCmdType End Sub
If you remove the kNonShapeEditCmdType flag from the DisabledCommandTypes property of an assembly document (e.g. by setting it to 0) then you could rename the document and its occurrences. I do not suggest that you do that though; it's just to test that that is the only setting that prevents you from doing those changes in a Design Accelerator assembly.