When Im using CAD to GeoDatabase on ArcGIS Pro (2.9), some of the solids converted as closed multipatches and some as open multipatches. GetMessages ( 2 )) # Return python error messages for script tool or Python Window arcpy. Converting CAD solids as closed MultiPatches using ArcGIS Pro I have DWG files with solids geometries. Syntax Inside3D_3d (in_target_feature_class, in_container_feature_class, out_table, \n '. Only included if the Complex Output Table option is selected Contain_ID-Identifies the unique ID of the multipatch that intersects the input features are inside or partially inside.Status-Indicates if the feature identified by the Target_ID field is inside or partially inside a multipatch.Target_ID-The unique ID of the input feature.The following fields are present in the output table: A feature may fall within multiple closed multipatch features and have multiple entries in the output table. If the Complex Output Table option is selected, a record is created for each multipatch that a given input feature intersects. The Is Closed 3D tool can be used to determine if a multipatch feature class contains closed features, and the Enclose Multipatch tool can be used to eliminate gaps in multipatch features. If field based height measurements are present in a 2D feature class, the Feature To 3D By Attribute tool can be used to create a 3D feature class.Ĭlosed multipatch geometry is required for this analysis. Illustration UsageĪll input features must have Z information stored as part of their geometry. Additionally, I have to say that I'm using ArcGIS pro 2.3 and can only hope that it works in other versions as well.Determines if 3D features from an input feature class are contained inside a closed multipatch, and writes an output table recording the features that are partially or fully inside the multipatch. Unfortunately, since there is no arcpy documentation for multipatch objects I don't know if it always works but it did in the cases I was testing. See Working with 3D set operators for more information on what set operators are and how to use them. This tool is a 3D set operator that provides analytical functions on 3D features. Ic = arcpy.da.InsertCursor(out_name, fields) The Is Closed 3D tool can be used to determine whether a multipatch feature class contains any unclosed features. # Create the output feature class (fields copied from the multipatch_layer)Īrcpy.CreateFeatureclass_management(out_path, out_name, 'POLYGON', multipatch_layer) Poly = row.difference(arcpy.Polygon(arcpy.Array(None))) # Option 2: Take the difference of multipatch with empty polygon -> converts it to polygon Poly = row.union(arcpy.Polygon(arcpy.Array(None))) # Option 1: Union the multipatch with an empty polygon -> converts it to polygon # If all elements are vertical, arcpy somehow returns the bounding box -> don't add these elements conversion to polygon yieds a partCount > 0) # At least one element has to be non-vertical for the results to be correct (i.e. # (except FID and Shape )įields = įor row in arcpy.da.SearchCursor(multipatch_layer, fields): # Select all fields to be present in the output layer as well # Initialize the variables (choose your folder and names) For those who don't have 3D Analyst, here is the python code I'm using as a workaround.
0 Comments
Leave a Reply. |