Get write access button
Get write access button
(OP)
Trying to make a button on my toolbar to get write access. Every time I open a part now we have it set to open everything read only. I am sick of going "file, get write access". I just want to click a button. I also failed at making a macro for it.
Any advice?
Any advice?






RE: Get write access button
RE: Get write access button
Thanks!
RE: Get write access button
RE: Get write access button
We have the same situation everything is read only and we have to change the status if we need to update something.
Grant
Applications Engineer
SW2008 X64 SP 3.1
Dell Precision T5400
Nvidia Quadro FX 5600
Xeon 2.5GHz Quad Core, 4GB RAM
XP Pro X64 SP2.0
RE: Get write access button
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long
Dim Annotation As Object
Dim Gtol As Object
Dim DatumTag As Object
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
Dim retval As Variant
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
boolstatus = Part.SetReadOnlyState(ReadOnlyState)
End Sub
--------------------------------
Let me know how it works for you
RE: Get write access button
Grant
Applications Engineer
SW2008 X64 SP 3.1
Dell Precision T5400
Nvidia Quadro FX 5600
Xeon 2.5GHz Quad Core, 4GB RAM
XP Pro X64 SP2.0
RE: Get write access button
RE: Get write access button
We had "employee A" open an assembly. That assembly contained a part that "employee B" had open. Employee B would make a change to the part and save it. Employee A had write access to it in the assembly, when he would save it it would over write what B did.
Now, everything is set to open read only. If you want W/A to it, you have to ask for it. If someone else already has W/A to it, it tells you the name of the person who has write access.
Made the change a year ago after problem after problem. Now, not a single problem since.
We have no PDM.
RE: Get write access button
I do not see how a person opening an assembly that contains a read only file (open on another machine) could be able to overwrite it. Windows locks the file whenever someone opens it. Is your server non-Windows? We do not use PDM, and have done extensive checking that once a user has read/write permissions, no one else can write, until it is suppressed and the assembly is saved so someone else can grab it.
Gerald
RE: Get write access button
Someone would open something and it would be read only. Someone else would open it read only and get write access, make a change, and save. The original person still had it on their scree in the old state and would get write access and save it, thus overwriting the changes the second person made.
Thats the best I can explain it.
Making everything default open to read only fixed the problem. Been that way for 2 years now. I tested it with it off and on and the only way to avoid it was to have it on.
RE: Get write access button
Are/were you using the Tools > Options > System Options > Collaboration settings?
RE: Get write access button
RE: Get write access button
search for this marco along time.
Found it but now i don't get it to work.
Can somebody help me out? (little macro noob)
Get this error
"COMPILE ERROR"
"AMBIGUOUS NAME DETECTED : SWAPP"
Thx
RE: Get write access button
Eric