Checkout SDE fersioned feature classes to a personal geodatabase using VBA

1752
1
06-17-2010 10:13 AM
TimothyMorales
New Contributor II
I am trying to check-out more than one specific SDE Versioned feature class into a personal geodatabase (.mdb) using vba within ArcCatalog. I have found plenty of examples to do this for an entire feature dataset, but none those examples demonstrates how do to the same process selectively for specific feature classes witin a SDE versioned geodatabase. I have attached a pdf with a diagram of what I am needing to do.
0 Kudos
1 Reply
ScottDavis
Occasional Contributor
This can be done very easily with Python. Here is an excerpt from a script that I use:
    if gp.Exists(CheckoutFolder + "\\" + CheckoutDB):
        st.Report("There is already a Signs Checkout Geodatabase. Perhaps you need to Check in?")
        raise Exception, "Checkout Geodatabase already exists."
    
    st.Report("Creating new Checkout Geodatabase...")
    gp.CreatePersonalGDB_management(CheckoutFolder, CheckoutDB)
    
    st.Report("Checking Out Database...")
    gp.Workspace = PubWorksSDE
    print str(gp.Workspace)
    gp.CreateReplica_management(CheckoutData, "CHECK_OUT", CheckoutFolder + "\\" + CheckoutDB, SignsCheckoutName)
    st.gpReport()


See attached for the entire script. I only check out one feature class but CreateReplica can accept more than one. See attached for the entire script saved as a .txt file.
0 Kudos