I'm not sure about referencing it directly, but you can create a simple python script that opens a batch file that you can import into your model. Here is a fairly detailed Stack Overflow post explaining it far better than I could.
Thanks for your reply but I am afraid I know absolutely nothing about python. I have read a few posts about incorporating python with model builder - how do you combine the two? Do you have to export the whole model to python then add in the additional python script? Thanks Mark
Hi, Solved this in the end. I was stopping services to register a feature class as versioned to then delete features then append features from a new feature class. I removed the register as versioned task and all updates wen through fine:) Mark
No, you should just be able to add a simple python script to your model and call it the same way you would a tool. Would be slightly different if you need to pass parameters to it. Something like this is a basic example.
from subprocess import Popen
Although I have solved this particular issue updating data it would be good to get this sussed though for reference. Don't understand how to add the script which calls the batch file to the model. Do you right click in the model and add script from somewhere or do you copy paste the code to a .txt file, rename to .py then drag drop into the model.. hope that makes sense, Thanks Mark
I was trying to right click in the model, right click within the tool box couldn't find add script option - but eventually got it by right clicking over the actual toolbox and select add - script. Thanks for your help with this - it's appreciated. Mark