Customer Service | Training | Contact Us
You are here: Home > User Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - ArcCatalog Data Creation & Import/Export forum

:-( Microstation DGN TO ESRI seperate SHP f...   Edwin Wiering Sep 12, 2002
Re: :-( Microstation DGN TO ESRI seperate S...   Olivier Damanet Sep 12, 2002
Re: :-( Microstation DGN TO ESRI seperate S...   Edwin Wiering Sep 16, 2002
Re: :-( Microstation DGN TO ESRI seperate S...   Justin Conner Sep 16, 2002
Re: :-( Microstation DGN TO ESRI seperate S...   Edwin Wiering Sep 17, 2002
Re: :-( Microstation DGN TO ESRI seperate S...   Olivier Damanet Sep 17, 2002
Re: :-( Microstation DGN TO ESRI seperate S...   neelam saxena Jan 08, 2010
Re: :-) Microstation DGN TO ESRI seperate S...   Edwin Wiering Sep 17, 2002
Re: :-) Microstation DGN TO ESRI seperate S...   Rossimah Sinordin Jan 09, 2005
Re: :-) Microstation DGN TO ESRI seperate S...   Dany Salazar Gonzalez Aug 16, 2007
Report Inappropriate Content • Top • Print • Reply    
Subject :-( Microstation DGN TO ESRI seperate SHP files 
Author Edwin Wiering 
Date Sep 12, 2002 
Message Hello,

Procedure
-I have a few (Microstation)DGN file's.
-with ArcToolbox I convert the DGN polygons to a Personal Geodatabase;
-and from the personal geodatabase I convert it to a shapefile;
-Starting ArcMap; press "Ad Data" button; Select just generated SHP-file
-select the SHP-file in the TOC; click right mouse button;
-select properties; select symbology tab; Categories Unique Values;
-value field select layer; press Add All values; press "Apply"
Result:
-In the view and the TOC the SHP disappears with all the colours of the rainbow;
-This works good!!
Problem:
-From Each (DGN)-layername I want a sepparate SHP file!!
-(to control each layer)
Question:
-Is there a utilitY to make sepparate SHP files from each layername?

Thanks

Edwin Wiering
 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: :-( Microstation DGN TO ESRI seperate SHP files 
Author Olivier Damanet 
Date Sep 12, 2002 
Message I think you should be able to read the DGN directly in ArcMap, and then perform an attribute query based on the CAD-layer name and export the selected features to a new shapefile.
Note: The DGN will be presented as 4 feature classes: Annotation, Point, Polyline and Polygon. You will hence have to perform the operation for each of them! 
  Olivier. 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: :-( Microstation DGN TO ESRI seperate SHP files 
Author Edwin Wiering 
Date Sep 16, 2002 
Message Thans Olivier

Your way, is much faster.
But every time, I must make a query!
I surched the internet for a aplication,
but not found.

I am now bizzy making a VB-application for
this problem.
But the questions stays(for one week); Is there a application that solve my problem.

If not Olivier gets the points for MVP?

Thanks
Edwin

 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: :-( Microstation DGN TO ESRI seperate SHP files 
Author Justin Conner 
Date Sep 16, 2002 
Message When importing your DGN to a PGDB, there is a way to query and select only the layers you want. This way you would have a feature class for each layer.

On the CAD to Geodatabase Arctoolbox wizard - select "Change Settings". You will find what you need in there. 
  Justin Conner
GIS Specialist
Wood County, Wisconsin 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: :-( Microstation DGN TO ESRI seperate SHP files 
Author Edwin Wiering 
Date Sep 17, 2002 
Message Sorry Justin,

This is not the answer!

The CAD-drawing (dgn/dwg) is a drawing with about 54 layers/levels.
Fore each time i must make a seperate SHP-file.
Yes indead, i can make a qeury each time.
But when i get more CAD-drawings each time i must make a query (And this is not what i want)
I think there is no application that do this automatically.

I am now making a vb-application that make a selection of each AutoCAD.Layername or Microstation.Levelnr and then make a SHP-file.
(The querys and SHP-files are generated by the program automatically)

Any help is welcome.

Edwin


 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: :-( Microstation DGN TO ESRI seperate SHP files 
Author Olivier Damanet 
Date Sep 17, 2002 
Message Hi Edwin,
Here is ArcObjects code to show you how to loop through each DGN layers, and then perform a query to filter its features.
Other useful information can be found in the following samples:
-How to get CAD FeatureLayers of a drawing (i.e. the 4 typed feature classes): http://arconline.esri.com/arcobjectsonline/default.asp?URL=/ArcObjectsOnline/Samples/ArcMap/CAD/AddCadLayer.htm
-How to create a shapefile: http://arconline.esri.com/arcobjectsonline/default.asp?URL=/ArcObjectsOnline/Samples/Geodatabase/Creating%20Data/CreateNewShapefile.htm
-How to insert features from a feature cursor to an existing feature class object: http://arconline.esri.com/arcobjectsonline/default.asp?URL=/ArcObjectsOnline/Samples/Geodatabase/InsertFeatures.htm

I hope this information will be enough helpful for automating this process... 
 
Public Sub ExportCadLayersToShape(pCADFeatureLayer As IFeatureLayer, OutputShapeFilesPath As String)

Dim pCADDrawingLayers As ICadDrawingLayers
If Not TypeOf pCADFeatureLayer Is ICadDrawingLayers Then Exit Sub
Set pCADDrawingLayers = pCADFeatureLayer
Dim i As Integer
Dim strCADDgLayerName As String
Dim pQueryFilter As IQueryFilter
Dim pInFeatureCursor As IFeatureCursor
For i = 0 To pCADDrawingLayers.DrawingLayerCount - 1
    strCADDgLayerName = pCADDrawingLayers.DrawingLayerName(i)
    Set pQueryFilter = New QueryFilter
    pQueryFilter.WhereClause = "LAYER = '" & strCADDgLayerName & "'"
    Set pInFeatureCursor = pCADFeatureLayer.FeatureClass.Search(pQueryFilter, False)
    'Now you can export the features contained in the cursor to a new shapefile
    '.....
Next i
End Sub
 
  Olivier. 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: :-( Microstation DGN TO ESRI seperate SHP files 
Author neelam saxena 
Date Jan 08, 2010 
Message Hello sir,
i m new to this..
i have the same task ..i have no. of .dgn CADfiles and i need to convert in to feature class (shapefile)
i have used your code, but i am getting error when i m using it on button click event (UIControls)..object not defined.may be i m using wrong way.can u please suggest me how to use.

Thanks 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: :-) Microstation DGN TO ESRI seperate SHP files 
Author Edwin Wiering 
Date Sep 17, 2002 
Message :-)Thanks a lot Oliver,

By the way, Another useful application is CleanShapeFile.
(This application requires a input shapefile)
-I've changed the procedure GetShapeFile into
GetCADfile.
-And made the m_pgxObjectfilter into
GxFilterCadFeatureClasses
-A small enhancement to the procedure
CreateNewShapefile (Add the lines:
Set m_pGxDialog = New GxDialog
Set m_pGxObjectFilter = New GxFilterShapefiles)

Result: A dgn feature class converts to a shp-file
(now only filter the layer and make a selection)

Edwin
 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: :-) Microstation DGN TO ESRI seperate SHP files 
Author Rossimah Sinordin 
Date Jan 09, 2005 
Message Hi Edwin,

I came accross a couple of your emails about converting DGN file to shp.I have the tasks of converting 100+ dgn files to shp files and I'm not quite sure how to go about it.I am using ArcGIS 9. I was wondering whether you have documented your methodology while doing the conversion and whether I can have a copy if possible. Thank you for your help, Ross Sinordin. 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: :-) Microstation DGN TO ESRI seperate SHP files 
Author Dany Salazar Gonzalez 
Date Aug 16, 2007 
Message Hi Edwin, I´m very interesting in the methologia, implemented by the convertion from dgn to arcview.

Dany