We're actually working on migrating 9.3 Schematics code into v.10 but we have some problems. In the 9.3 version, we used to use the method "OpenDiagram" (from the INgDiagramType) to open a schematic diagram in the current map. But impossible to find an equivalent to this method in the v.10.
Is anyone know which method to use instead? or if there's no equivalent, how can we try to open a diagram by code?
You should use the ISchematicDisplayDiagramHelper.
You need first to have a handle to the ISchematicDataset, then you get the desired diagram class (the old diagram type). From the class, you get the diagram and finally use the diagram helper to 'display' the diagram.
Dim pSchematicDiagramClass As ISchematicDiagramClass Dim pDiagramClassContainer As ISchematicDiagramClassContainer
pDiagramClassContainer = m_pSchematicDataset pSchematicDiagramClass = pDiagramClassContainer.GetSchematicDiagramClass("INTERNAL_DIAGRAM") Dim pDiagram As ISchematicDiagram pDiagram = pSchematicDiagramClass.SchematicDiagramByName(plant_name) ... m_pDispDiagramHelper.DisplayDiagram(pDiagram, Nothing)
You should use the ISchematicDisplayDiagramHelper.
You need first to have a handle to the ISchematicDataset, then you get the desired diagram class (the old diagram type). From the class, you get the diagram and finally use the diagram helper to 'display' the diagram.
Dim pSchematicDiagramClass As ISchematicDiagramClass Dim pDiagramClassContainer As ISchematicDiagramClassContainer
pDiagramClassContainer = m_pSchematicDataset pSchematicDiagramClass = pDiagramClassContainer.GetSchematicDiagramClass("INTERNAL_DIAGRAM") Dim pDiagram As ISchematicDiagram pDiagram = pSchematicDiagramClass.SchematicDiagramByName(plant_name) ... m_pDispDiagramHelper.DisplayDiagram(pDiagram, Nothing)