3/26/2023 0 Comments Arcobjects icursorTo utilise python in the everyday use of ArcGIS, a user will need comprehension in the basic language of python and how the tools and functions in ArcGIS are called upon and made use of in a python environment. This has been made readily available to ArcGIS users in the arcpy library and module. All tools and functionality can, in one form or another, be called upon and made use of in python. The use of python is integrated into all aspects of ArcGIS. Some pre-existing python comprehension and knowledge of arcpy is required. This is intended as an introductory level tutorial to arcpy and python. Have you had trouble understanding how to access your polygon data from within python, or how cursors can be established and used in ArcGIS? Our second instalment in the series will help explain how and when to use them to successfully run your scripts. We have created the Python Insights blog series to help other Python users by providing solutions to common problems and handy hints. If ( blnCancel != true) //could have cancelled on either frmDatasetTemplateName or frmSelectItemsToReduceįormAdvanced.Programming or scripting is used to make this attribution into a very usable, visually pleasing product. layers corresponding to a geometric network this can happen if the map document didn't have any cancelFormEvent += new EventHandler( formReduce_cancelFormEvent) doneFormEvent += new EventHandler( formReduce_doneFormEvent) įormReduce. find out if we need to create node reduction rulesįormReduce = new frmSelectItemsToReduce() įormReduce. Length > 0) //make sure we get something back StrLayers = CreateSchLayers( pEnumLayer) should only happen if the user clicks cancel on the gxdialog If ( blnCancel != true) //only true if the user cancels the first form formNames_cancelFormEvent Show( "The name of the dataset or template already exists. we are not on a database or a schematic dataset dataset, just get template names, then create objects get dataset and template names, then create the objects esriFTComplexJunction)įor ( int i = 0 i ( formNames_nextFormEvent) create the fields collections to be used by the frmAdvanced formÄictionary. Build up the string for just the node feature classes Build up the string that will go to the select items to reduce form LocalDictionary = ProcessFCs( fcCompleådge, fcComplexNode, fcSimpleEdge, fcSimpleNode) IEnumFeatureClass fcSimpleNode = networkClass. IEnumFeatureClass fcSimpleEdge = networkClass. IEnumFeatureClass fcComplexNode = networkClass. IEnumFeatureClass fcCompleådge = networkClass. GeometricNetwork))Äictionary localDictionary = new Dictionary() If (( gn = null) || ( gn != networkClass. INetworkClass networkClass = ( INetworkClass) featureLayer. The FeatureType property of feature classes that implement this interface will be esriFTSimpleJunction, esriDTSimpleEdge, esriFTComplexJunction, or esriFTCompleådge. ISchematicDatasetImport) m_pSDS Äictionary myDictionary = new Dictionary() įeatureClass = featureLayer. Private string CreateSchLayers( IEnumLayer pLayers) Private Dictionary ProcessFCs( IEnumFeatureClass fcCompleådge, IEnumFeatureClass fcComplexNode, IEnumFeatureClass fcSimpleEdge, IEnumFeatureClass fcSimpleNode)Äictionary pDictionary = new Dictionary() IMapReader pMapReader = new MapReaderClass() check to see if the user canceled the dialog GxDialog pGxDialog = new GxDialogClass() now get the map document to parse out the feature classes Private IGxObject m_SelectedObject = null NameValueCollection m_måol = new NameValueCollection() Public frmSelectItemsToReduce formReduce Public class GenerateSchematicTemplate : ESRI. Namespace SchematicCreateBasicSettingsAddIn namespace SchematicCreateBasicSettingsAddIn See the use restrictions at /DeveloperKit10.0/userestrictions.txt.without modification, provided you include the original copyright You may freely redistribute and use this sample code, with or and applicable international laws, treaties, and conventions. All rights reserved under the copyright laws of the United States See the License for the specific language governing permissions and WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Unless required by applicable law or agreed to in writing, softwareÄistributed under the License is distributed on an "AS IS" BASIS, You may not use this file except in compliance with the License. Licensed under the Apache License, Version 2.0 (the "License")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |