ArcFM Desktop Developer Guide
IMMXMLData Interface
Members 


Version: 10.2.1b and 10.2.1b SP1

Resource Center Home

Data is imported to and exported from the Analysis API via XML using this interface. This interface is used by Network Adapter's Analysis API, CYMDIST API, Electric Solver API and MultiSpeak API.
Available at Version
9.2.1 and later
Product Availability

ArcFM Desktop

Required Licenses

ArcFM, Designer, or ArcFM Viewer

.NET Assembly
Miner.Interop.Desktop.dll
Object Model
IMMXMLData Interface
Syntax
'Declaration
 
<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)>
<TypeLibTypeAttribute(TypeLibTypeFlags.FOleAutomation)>
<GuidAttribute("41F74431-0427-11D5-BE03-0001031AE9B0")>
<ComImportAttribute()>
Public Interface IMMXMLData 
'Usage
 
Dim instance As IMMXMLData
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[TypeLibType(TypeLibTypeFlags.FOleAutomation)]
[Guid("41F74431-0427-11D5-BE03-0001031AE9B0")]
[ComImport()]
public interface IMMXMLData 
Example

The following two code samples show how to use the property sets available.

Set Properties for Export (Visual Basic) Copy Code
Private Function MspAPIExportProps(Optional OutputXMLFileName As String = "", _
Optional Verb As String = "Change") As IPropertySet
'return a property set containing an XSL path
'and a MultiSpeak XML path, if provided
'also include default verb and owner

    'get xsl file name
    Dim pReg As IMMRegistry
    Dim XSLFileName As String
    Set pReg = New MMRegistry
    Call pReg.OpenKey(mmHKEY_LOCAL_MACHINE, mmArcFM, k_STYLE_SHEET_REGKEY)
    XSLFileName = pReg.Read(NETADAPTERMSPXSLPATH, "")

    'set properties
    Dim Props As IPropertySet
    Set Props = New PropertySet
    Call Props.SetProperty(k_MESSAGECALLBACK, Me)
    Call Props.SetProperty(IMPORTMODE, FROMGIS)
    If XSLFileName <> "" Then
        Call Props.SetProperty(GISEXPORT_XSL, XSLFileName)
    End If
    If OutputXMLFileName <> "" Then
        Call Props.SetProperty(MSPXML, OutputXMLFileName)
    End If
    Call Props.SetProperty(MSPVERB, Verb)

    Set MspAPIExportProps = Props

End Function

 

Set Properties for Import (Visual Basic) Copy Code

Private Property Get ImportProperties(AnalysisType As String, Wksp As IWorkspace) _
As IPropertySet
'return a property set telling the
'MultiSpeak API to import analysis results using
'the argument as the network XML for linking results
'to features

    Dim Props As IPropertySet
    Set Props = New PropertySet
    Call Props.SetProperty(IMPORTMODE, FROMEA)
    Call Props.SetProperty(ANALYSIS_TYPE, AnalysisType)
    Call Props.SetProperty(k_MESSAGECALLBACK, Me)

    'pass the ObjectClassIDs in an XML document
    'this associates classIDs with object class names so that we
    'can store results in their appropriate tables in NetworkAdapter.mdb
    Static pXMLClassIDs As DOMDocument30 'no need to create this more than once

    If pXMLClassIDs Is Nothing Then
        Set pXMLClassIDs = GetClassIDs(Wksp)
    End If
    If Not pXMLClassIDs Is Nothing Then
        Call Props.SetProperty(CLASS_IDS, pXMLClassIDs)
    End If

    'import style sheet
    Dim sXSLFileName As String
    Dim pReg As IMMRegistry
    Set pReg = New MMRegistry
    Call pReg.OpenKey(mmSystem.mmHKEY_LOCAL_MACHINE, mmSystem.mmDistOps, k_MINERVILLE_MULTISPEAK)
    sXSLFileName = pReg.Read(NETADAPTER_RESULTSXSLPATH, "")
    If sXSLFileName <> "" Then
        Call Props.SetProperty(GISIMPORT_XSL, sXSLFileName)
    End If

    'save the results template
    If Not pXMLClassIDs Is Nothing Then
        Dim ResultsTemplateFileName As String
        ResultsTemplateFileName = UserPath + "\" + RESULTS_TEMPLATE
        If Not PathExists(ResultsTemplateFileName) Then
            ResultsTemplateFileName = Environ("TEMP") + "\" + RESULTS_TEMPLATE
        End If

        Call pXMLClassIDs.Save(ResultsTemplateFileName)
    End If

    Set ImportProperties = Props

End Property

 

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

IMMXMLData Members
Miner.Interop Namespace

Data is imported to and exported from the Analysis API via XML using this interface. This interface is used by Network Adapter's Analysis API, CYMDIST API, Electric Solver API and MultiSpeak API.
Object Model
IMMXMLData Interface
Syntax
'Declaration
 
<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)>
<TypeLibTypeAttribute(TypeLibTypeFlags.FOleAutomation)>
<GuidAttribute("41F74431-0427-11D5-BE03-0001031AE9B0")>
<ComImportAttribute()>
Public Interface IMMXMLData 
'Usage
 
Dim instance As IMMXMLData
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[TypeLibType(TypeLibTypeFlags.FOleAutomation)]
[Guid("41F74431-0427-11D5-BE03-0001031AE9B0")]
[ComImport()]
public interface IMMXMLData 
Example

The following two code samples show how to use the property sets available.

Set Properties for Export (Visual Basic) Copy Code
Private Function MspAPIExportProps(Optional OutputXMLFileName As String = "", _
Optional Verb As String = "Change") As IPropertySet
'return a property set containing an XSL path
'and a MultiSpeak XML path, if provided
'also include default verb and owner

    'get xsl file name
    Dim pReg As IMMRegistry
    Dim XSLFileName As String
    Set pReg = New MMRegistry
    Call pReg.OpenKey(mmHKEY_LOCAL_MACHINE, mmArcFM, k_STYLE_SHEET_REGKEY)
    XSLFileName = pReg.Read(NETADAPTERMSPXSLPATH, "")

    'set properties
    Dim Props As IPropertySet
    Set Props = New PropertySet
    Call Props.SetProperty(k_MESSAGECALLBACK, Me)
    Call Props.SetProperty(IMPORTMODE, FROMGIS)
    If XSLFileName <> "" Then
        Call Props.SetProperty(GISEXPORT_XSL, XSLFileName)
    End If
    If OutputXMLFileName <> "" Then
        Call Props.SetProperty(MSPXML, OutputXMLFileName)
    End If
    Call Props.SetProperty(MSPVERB, Verb)

    Set MspAPIExportProps = Props

End Function

 

Set Properties for Import (Visual Basic) Copy Code

Private Property Get ImportProperties(AnalysisType As String, Wksp As IWorkspace) _
As IPropertySet
'return a property set telling the
'MultiSpeak API to import analysis results using
'the argument as the network XML for linking results
'to features

    Dim Props As IPropertySet
    Set Props = New PropertySet
    Call Props.SetProperty(IMPORTMODE, FROMEA)
    Call Props.SetProperty(ANALYSIS_TYPE, AnalysisType)
    Call Props.SetProperty(k_MESSAGECALLBACK, Me)

    'pass the ObjectClassIDs in an XML document
    'this associates classIDs with object class names so that we
    'can store results in their appropriate tables in NetworkAdapter.mdb
    Static pXMLClassIDs As DOMDocument30 'no need to create this more than once

    If pXMLClassIDs Is Nothing Then
        Set pXMLClassIDs = GetClassIDs(Wksp)
    End If
    If Not pXMLClassIDs Is Nothing Then
        Call Props.SetProperty(CLASS_IDS, pXMLClassIDs)
    End If

    'import style sheet
    Dim sXSLFileName As String
    Dim pReg As IMMRegistry
    Set pReg = New MMRegistry
    Call pReg.OpenKey(mmSystem.mmHKEY_LOCAL_MACHINE, mmSystem.mmDistOps, k_MINERVILLE_MULTISPEAK)
    sXSLFileName = pReg.Read(NETADAPTER_RESULTSXSLPATH, "")
    If sXSLFileName <> "" Then
        Call Props.SetProperty(GISIMPORT_XSL, sXSLFileName)
    End If

    'save the results template
    If Not pXMLClassIDs Is Nothing Then
        Dim ResultsTemplateFileName As String
        ResultsTemplateFileName = UserPath + "\" + RESULTS_TEMPLATE
        If Not PathExists(ResultsTemplateFileName) Then
            ResultsTemplateFileName = Environ("TEMP") + "\" + RESULTS_TEMPLATE
        End If

        Call pXMLClassIDs.Save(ResultsTemplateFileName)
    End If

    Set ImportProperties = Props

End Property

 

Inheritance Hierarchy

Miner.Interop.IMMXMLData

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

IMMXMLData Members
Miner.Interop Namespace

 

 


Send Comment