The same functions provided by the CheckOutIcon in the Web interface are available from the command line using the cmd4 client.
To check-out the object with database id 1664:
c:\program files\tera\gn4\bin>cmd4 clientget 1664 -checkout -name MimoPC
Cmd4 version 1.1.277.0 debug
GN4 command-line client
Copyright © 2006 - 2009 Tera Digital Publishing
Language en-US
Object with id 1664 checked-out into 'c:\temp\users\MiMo\Test\DSC.jpg'
c:\program files\tera\gn4\bin>
where ‘-name MimoPC’ specifies the clientSpec to use. If ‘-checkout’ is omitted the object is copied to a file on the client computer WITHOUT checking out the object – equivalent to the ‘Get without check-out’ command in the Web interface.
To check-in the same object:
c:\program files\tera\gn4\bin>cmd4 clientput 1664 -checkin -name MimoPC
Cmd4 version 1.1.277.0 debug
GN4 command-line client
Copyright © 2006 - 2009 Tera Digital Publishing
Language en-US
Object with id 1664 checked-in from 'c:\temp\users\MiMo\Test\DSC.jpg
c:\program files\tera\gn4\bin>
If the object has been checked-out but it is no longer necessary to modify it – or the changes that have been made on the local file are wrong and it is better to ‘undo’ them, use the cmd4 command clientrevert:
c:\program files\tera\gn4\bin>cmd4 clientrevert 1664 -name MimoPC
Cmd4 version 1.1.277.0 debug
GN4 command-line client
Copyright © 2006 - 2009 Tera Digital Publishing
Language en-US
Object with id 1664 reverted to 'c:\temp\users\MiMo\Test\DSC.jpg
c:\program files\tera\gn4\bin>
This eliminates the check-out and copies to the local file the object data – overwriting any change. It is equivalent to the ‘Revert’ menu command in the Web interface. Note that using ‘cmd4 clientrevert’ on an object that is not checked-out has exactly the same effect of using ‘cmd4 clientget’ without the ‘-checkout’ option.
Use ‘cmd4 help clientget’, ‘cmd4 help clientput’ and ‘cmd4 help clientrevert’ to see all the options of the clientget, clientput and clientrevert commands.
Note: the above connects to the default connection: should you want to specify the connection or server name, see cmd4 examples.