Hi
I'm creating 3D scenes and updating them from geodatabase using python script in ArcGIS Pro. I have automated entire process except one little step. Features in a building footprints layer have to be on-the-ground for extrusion but if I add the data from geodatabase then the features in layer are at-an-absolute height. How to set layer elevation setting "on-the-ground" with python script in ArcGIS PRO?
Thank you in advance
Andres
there are not 3d methods or classes exposed directly in the arcpy module, You will have to continue to call/use the tools from within the existing toolset providing defaults if applicable or even possible.
Thank you, Dan
I will stop spending time on this issue at the moment then. Maybe in the future there will be some other or new solution for this.
You might be (should be?) able to achieve this using Python CIM access. Read this carefully: Python CIM access—ArcPy | Documentation
In the tips section of that documentation it basically says that if you're not sure what property you need to be modifying in the cim, change it in the UI and compare with changes in the output json. So I did a quick experiment (though looking back, I'm doing this in a Map rather than a Scene - hopefully the process would work for you).
When my layer's Elevation is set to "On the ground"
I export a layer file to get the .json and open that in Notepad++.
I see
And I can see that the Ground surface for the map uses the same. So it’s tying the layer’s elevation to the map’s ground elevation surface.
Maybe you could do the same with the layers in your Scene to understand how the Ground setting is structured in the json and then use Python CIM access to get the definition, make modifications, and set the definition. Again, heed the caution noted in the documentation:)
Also, here are some examples for common requests using the CIM access through Python: https://www.arcgis.com/home/item.html?id=8772f61319584882bb697ba003030636
Kory, I did not notice your answer before. Your suggested solution sounds really interesting and I will try it next week. Thank you and I will report about my experiment.
Well, CIM did the trick. So many thanks, Kory!
At first I did look it like a year ago also but I did not understand that it is possible to add new properties with setDefiniton method. Anyhow works now like a charm.
I will add the code over here if anyone will need a hint or smthng.
where the code is added? how to add the code in python for the purposes?