A simple rule of thumb for doc locking - if you're coming from a dialog to the editor (after hitting your pick points button say) you need to lock the document because you're coming from a non document context to the doc context and you have to let autocad know.
If you are running a command from the command line (no windows), autocad automatically looks after the locking operation.