Programmatically add (and activate Elevation and Extrusion) 3d layer to local Scene Using ArcPy

I have been unable to programmatically add (and activate Elevation and Extrusion properties) a layer to the 3d section of a local Scene Using ArcPy.

I am able to programmatically set elevation and extrusion properties for layers in a scene, but I have not been able to programmatically add these layers to a 3d scene. Despite setting the elevation and extrusion properties, the layers do not display in 3D until I manually move them from the “2d” section to the “3d” section. Then to activate the elevation properties so they display appropriately I must open the layer properties dialog, go to the Elevation tab, open the expression dialog where I see my programmatically set expression and click OK. (without making any changes to the expression).

def execute(self, parameters, messages):
aprx = arcpy.mp.ArcGISProject("CURRENT")
local_scene = next((scene for scene in aprx.listMaps() if scene.name == "The3DSceneName" and scene.mapType == "SCENE"), None)
group_layer = local_scene.createGroupLayer("TheGroupName")

group_layer_cim = group_layer.getDefinition('V3')
    
group_layer_cim.layer3DProperties = arcpy.cim.CIM3DLayerProperties()

# Setting the layer3DProperties properties
group_layer_cim.layer3DProperties.castShadows = True
#... ect set layer3DProperties
# Push the updated CIM definition back to the group layer
group_layer.setDefinition(group_layer_cim)

#'partition_layer' is previously defined and configured
cim_definition = partition_layer.getDefinition('V3')
cim_definition.layer3DProperties = arcpy.cim.CIM3DLayerProperties()
cim_definition.layer3DProperties.applyAsElevationLayer = True


# Additional code for setting extrusion and elevation...
elevation_definition = arcpy.cim.CIMSymbolizers.CIMExpressionInfo()
elevation_definition.title = "Custom"
elevation_definition.expression = f"$feature.{field2_name} / {user_defined_number}" 
elevation_definition.name = ""
elevation_definition.returnType = "Default"

cim_definition.featureElevationExpressionInfo = elevation_definition


partition_layer.setDefinition(cim_definition)

extrusion_expression = f"([{field1_name}] - [{field2_name}]) / {user_defined_number_meters}"
partition_layer.extrusion('BASE_HEIGHT', extrusion_expression)

local_scene.addLayerToGroup(group_layer, partition_layer, "BOTTOM")

Again, when I inspect the properties of the layer, the elevation and extrusion properties are set correctly, but it’s like they are not activated (especially in the case of elevation, as I have to click OK through the elevation dialogs without changing anything for it to take effect. )

  • How can I ensure that the elevation and extrusion settings take effect programmatically without needing to open and close the properties dialog?
  • Is there a specific property or method call I am missing that activates or refreshes these settings within a 3D scene?
  • By setting the group layer’s 3d properties group_layer_cim.layer3DProperties in the CIM I am able to programmatically add all layers to the 3d section of the Scene, but the layers within the group are only rendered as 2d, despite having their extrusion properties set. How can I render all in the 3d Scene as 3d programmatically?
    Any insights or suggestions on how to resolve these issues would be greatly appreciated!

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật