Please let me know.
Moustafa
Follow this solution: Get Write Access
then you can record a simple macro and assign a keystroke: 2016 SOLIDWORKS Help - Assigning a Macro to a Keyboard Shortcut or Mouse Gesture
If that doesn't work, try the code below (in bold) for the macro. I came across the code here <Get write access button - DASSAULT: SOLIDWORKS 3D Design - Eng-Tips >, but it had a syntax error, a missing "End If", and some extraneous definitions at the beginning-- so I changed that:
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim ReadOnlyState As Boolean 'TRUE= only, FALSE = not
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
ReadOnlyState = Part.IsOpenedReadOnly()
If ReadOnlyState = False Then
ReadOnlyState = True
Else
ReadOnlyState = False
End If
boolstatus = Part.SetReadOnlyState(ReadOnlyState)
End Sub
The only way we've found is by using a macro, and then hot-keying to that macro.
Dale