Canceling document's check-out
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I'm looking for a programmatic way of canceling document's check-out status.
The check-out status can be found in iProperties on "Status" tab, down in the "File status" field.
In the past we've used in our company some shared projects, so we don't overwrite our work and the status stayed written in some of the documents.
Now, here are the problems:
A) When someone opens any of these documents, they won't be allowed to save any changes since the document is checked out for someone else and no-one can neither check it back nor force the check out, since it's not enabled in the single-user project.
B) When I'm programmatically trying to replace the mentioned file's references (in apprentice) I'll get a generic error "parameter is not correct".
I've tried all of the following and in some cases it actually would replace one or two references (due to an error, I guess, since for every reference works a different or none of the listed methods), but that is way below reliable.
Dim oDoc As Inventor.ApprenticeServerDocument = ...
Dim Position As Integer = ... oDoc.File.ReferencedFileDescriptors(Position).ReplaceReference("%New path%") oDoc.ReferencedDocumentDescriptors(Position).ReferencedFileDescriptor.ReplaceReference("%New path%") oDoc.ReferencedFileDescriptors(Position).PutLogicalFileNameUsingFull("%New path%") oDoc.ReferencedFileDescriptors(Position).PutLogicalFileNameUsingFullSpl("%New path%")
Thanks for any help of leads to solution.
- - - - - - - - - - - - - - -
Regards,
Mike
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - John F. Woods