I am using ArcPro 3.2 accessing 11.1 Enterprise (will be upgraded soon to 11.2). I am testing my 3.1x code for creating a version in 3.2. I based my code on the ESRI Post (Part 2 - Branch Version with Parcel Fabric). This code has been working Great in 2.9 thru 3.1x. In 3.2 I can no longer change the version of the "Records" Feature class directly. However, this appears to happen when I change the version of the ParcelFabric that the Records feature class is a member of. Unfortunately, when I do this I can no longer create a new record in the new version. My steps for this test.
1. Create a new version (works great - no problem)
2. Get properties of new version (works great no problem)
3. Change the version manually (problems - Dialogue box is blank but code runs fine and version changes but problems)
Code is as follows for changing the version is as follows:
Versionmap = thisProject.listMaps("Map")[0] # Map map in my project (thisProject)
pfLayer = Versionmap.listLayers("TaxlotsPF")[0] #TaxlotPF is my parcel fabric
arcpy.AddMessage("-lyr: " + str(pfLayer.name)) # Just a message
updated_props = pfLayer.connectionProperties
arcpy.AddMessage(updated_props) # message to check properties
arcpy.AddMessage('-----------------------')
updated_props["connection_info"]["version"] = new_version_fullname # Props of the new version
updated_props["connection_info"]["versionguid"] = new_version_guid
pfLayer.updateConnectionProperties(pfLayer.connectionProperties,updated_props,auto_update_joins_and_relates = True, validate=True)
new_props = pfLayer.connectionProperties
Please let me know if I am doing something wrong ? I have tried several variations of this tool and also tried to use the changeversion tool. None seem to work.