I want a shortcut button that will let me "Open referenced files as read-only access". Does anyone have a macro that I can assign to a button?

I want to put the button up the very top of the screen. Does anyone have a macro that can change this setting that I can assign to a button?

Thanks.

SolidworksApi macros
Answers 3
DM
DM 2018-02-22 Best Answer

not sure why you would want to open files read only but this sounds like a great enhancement request.  for a right click command to open a part read only....

CI
CI 2018-02-22

I have a macro that will toggle the read only status of a file. We have the check box checked so that referenced files are opened ready only. We're using Windchill and Workgroup manager. The files come into the workspace locked. If we check them out, then they (usually) become not read only. The odd behavior is, if you open a model from a drawing, it is read only, even when checked out. So, I use the toggle macro to fix that rather than going under the file menu to "get write access". Do you think that would be helpful? If so I can post the macro.

JB
JB 2018-02-22

Enjoy:

<p>Sub main()</p><p>    Application.SldWorks.SetUserPreferenceToggle swExtRefOpenReadOnly, Not (-Application.SldWorks.GetUserPreferenceToggle(swExtRefOpenReadOnly))</p><p>End Sub</p>