ArcFM Engine Developer Guide
NextFileName Method


IGeometry (optional)
Long (optional)
Long (optional)
String (optional)
String (optional)
String (optional)
This method is called for each plot and should return a unique name for the file to be exported from Map Production. The arguments are supplied to provide the developer with a wide range of naming possibilities.
Syntax
'Declaration
 
Function NextFileName( _
   Optional ByVal PlotExtent As ESRI.ArcGIS.Geometry.IGeometry, _
   Optional ByVal PageNumber As Integer, _
   Optional ByVal TileNumber As Integer, _
   Optional ByVal SheetID As String, _
   Optional ByVal BaseFileName As String, _
   Optional ByVal BaseFileExtension As String _
) As String
'Usage
 
Dim instance As IMMNamer
Dim PlotExtent As ESRI.ArcGIS.Geometry.IGeometry
Dim PageNumber As Integer
Dim TileNumber As Integer
Dim SheetID As String
Dim BaseFileName As String
Dim BaseFileExtension As String
Dim value As String
 
value = instance.NextFileName(PlotExtent, PageNumber, TileNumber, SheetID, BaseFileName, BaseFileExtension)
string NextFileName( 
   ESRI.ArcGIS.Geometry.IGeometry PlotExtent,
   int PageNumber,
   int TileNumber,
   string SheetID,
   string BaseFileName,
   string BaseFileExtension
)

Parameters

PlotExtent
IGeometry (optional)
PageNumber
Long (optional)
TileNumber
Long (optional)
SheetID
String (optional)
BaseFileName
String (optional)
BaseFileExtension
String (optional)

Return Value

String
Example
The following code sample demonstrates how the IMMNamer::NextFileName method may be implemented.
Visual Basic Copy Code
Private Function IMMNamer_NextFileName(Optional ByVal PlotExtent As _
IGeometry, Optional ByVal PageNumber As Long, Optional ByVal _
TileNumber As Long, Optional ByVal SheetID As String, Optional ByVal _
BaseFileName As String, Optional ByVal BaseFileExtension As String) As String
    Dim pSFilter As ISpatialFilter
    Set pSFilter = New SpatialFilter

    Dim pArea As IArea
    Set pArea = PlotExtent.Envelope
    Set pSFilter.Geometry = pArea.Centroid
    pSFilter.GeometryField = "SHAPE"
    pSFilter.SpatialRel = esriSpatialRelIntersects

    Dim pCursor As IFeatureCursor
    Set pCursor = m_pFeatureClass.Search(pSFilter, False)

    Dim pFeature As IFeature
    Set pFeature = pCursor.NextFeature
    If Not pFeature Is Nothing Then
        IMMNamer_NextFileName = BaseFileName & "_oid_ & _
        pFeature.OID & "." & BaseFileExtension
    Else
        IMMNamer_NextFileName = BaseFileName & PageNumber _
        & "." & BaseFileExtension
    End If
End Function
Requirements

Target Platforms: Windows XP SP3 (32-bit and 64-bit), Windows 7 (32-bit and 64-bit)

Not all Operating Systems are supported on all products. Visit the ArcFM Solution Supported Versions page for full details.

See Also

Reference

IMMNamer Interface
IMMNamer Members

 

 


Send Comment