Thanks for the additional information.
I'm not totally sure why it would be giving you the error. However, one thing that I noticed that's different from the way I usually do things is that you're using sd-call-cmds to call your own function that then calls the Modeling commands.
The way I'd usually do that is in the push-action for doit_p, just call test_process, and then in the test_process function do something like this
Code:
(test_process ()
(sd-call-cmds (position_pa ... ))
(sd-call-cmds (position_pa ... ))
(sd-call-cmds (other_modeling_function ....))
)
This allows you to check the status at each step of the process to make sure you got the result you were expecting (and I believe it's more the way sd-call-cmds was intended to be used).
Also, I don't believe you need to include the :done in your position_pa function. Even though I don't believe it will cause an error, I don't think it does anything, either.
I hope this helps -- please let me know if you have more questions.
Thanks!
andy