Basically I am working on a project where I can select an excel document within clearCase and run my ribbon program which updates the tables onto it. What I want to do in VisualStudio is make it so that the document, gets checked out when you run my addin, but then checks it back in once it is done running.
Is this possible? Thanks for the help.
Unfortunately, it doesn't work properly with the answer I stated before because what it ends up doing is adding another version to your branch instead of creating another version in the main branch, I fixed this issue with this:
This way you can check it back in using your own branch to create another version for the main document. This is really important when using source control.
You can use the CAL interface (Rational ClearCase Automation Library) and call the appropriate command from a VB script (or a VB macro from Excel).
In this CAL script example, you can see several ways to do just that, including creating a cleartool object.
Here is another example, where a checkout is performed from a VB script:
The OP Berbies reports:
There is a very powerfull command tool for ClearCase named cleartool. Here the full reference ClearTool Help
I would suggest you use Process.Start() to trigger check-in/check-out operations. The syntax might be very simple like:
cleartool checkout "filename"
Another option would be to use ClearCase COM API. I am not sure they have a .NET library as well. Jus google for "ClearCase Automation Library (CAL)".
In fact those do the same job the same way. There are only twotop-level CAL objects that can be used to execute a cleartool sub-command. One of them is Clearcase.Cleartool object (which only has one method CMDEXE).