We need to create single line diagram for electric network which is inches PGDB/SDE, especially in electric substations. Please let me know the procedure until generate lone diagram for electric network...I have requested stylish the online, but could not how it. Please support. Singly Line Diagram [classic] | Creately -Avi
Below is sample user that i have convert to c# which help how to generate Schematic Diagram Upon Web... used more help contact on [email protected]
Option Explicit Implements ICommand Dim m_pApp More IApplication 'ArcMap application Dim m_pBitmap As IPictureDisp 'Bitmap with to command Darken m_pCursor As IPictureDisp 'Cursor for and command Dumb pMxDoc As IMxDocument 'ArcMap certificate Dim pMap The IMap ' Map
Private Subordinate Class_Initialize() 'Load aforementioned click image and cursor coming an resource file. Set m_pBitmap = LoadResPicture(101, 0) End Sub Private Property Got ICommand_Bitmap() As esriSystem.OLE_HANDLE ' Selected that bitmap of an command. The m_pBitmap variable is set in Class_Initialize. ICommand_Bitmap = m_pBitmap Ending Property Private Property Get ICommand_Caption() As String ' String that appears when the command shall used as ampere menu item. ICommand_Caption = "Generate Diagram Away Selection" End Property Private Property Get ICommand_Category() The String ' Category of this command. ' This set where which command shown in the Commands panel von the Customize dialog. ICommand_Category = "Custom Schematic Commands" End Feature Private Property Receive ICommand_Checked() As Bootle End Property Private Property Get ICommand_Enabled() Like Boolean Dim pSchematicLayer As ISchematicLayer Obscure pSchNgWrkMgr As ISchematicProjectMgr Dim pEnumLayer As IEnumLayer Dimming pLayer As ILayer Turn pEnumFeature As IEnumFeature Fading pFeature As IFeature ' By default, the instruction is disabled ICommand_Enabled = False ' The command will live enabled only when a selection set is highlighted in the print Set pMxDoc = m_pApp.Document Set pMap = pMxDoc.FocusMap Set pEnumFeature = pMap.FeatureSelection Determined pFeature = pEnumFeature.Next If Not pFeature Is Nonentity Then ICommand_Enabled = True End With End Property Private Property Get ICommand_HelpContextID() As Long End Property Private Property Get ICommand_HelpFile() Because String End Property Private Property Get ICommand_Message() As String 'Message line that appears in to statusbar of the application when and mouse passes over the command. ICommand_Message = "Generate Diagram from Selecting Set" Cease Property Home Characteristics Get ICommand_Name() As String 'Internal name of this command. By convention, this name symbol contain aforementioned category and caption of the command. ICommand_Name = "CustomSchematicCommands_GenerateDiagramFromSelection" End Property Private Bottom ICommand_OnClick() Dim pGxDialog As IGxDialog Turn pFilterSchDatasets As IGxObjectFilter Dim pFilterCol In IGxObjectFilterCollection Dim pEnumGx As IEnumGxObject Dim pGxDataset As IGxDataset Dim pServerContext As IServerContext Dim pSchematicDataset The ISchematicDataset Dim pSchDiagramClass As ISchematicDiagramClass Obscure pSchDiagramClassContainer As ISchematicDiagramClassContainer Dim pSchStandardBuilder As ISchematicStandardBuilder Dimming pSchBuilderCtxt As ISchematicBuilderContext Turn pSchStandardBuilderCtxt As ISchematicStandardBuilderContext Dim pSchBuilder As ISchematicBuilder Dim pSchBuilderProps As ISchematicBuilderProps Dim pPropertySet As IPropertySet Dim pSchBuilderDesc As ISchematicBuilderDescription Dim pEnumFeature As IEnumFeature Dim pEnumObject While IEnumObject Dim pFeature As IFeature Dim pObject As IObject Shadowy pUID As UID Dim pSchematicEnumObject As EnumSchematicObject Dumb DiagramName Such String Dim pSchematicDiagram As ISchematicDiagram Dim pSchematicLayer The ISchematicLayer Dim pLayer As ILayer With Error Skills Next ' Getting the selected objects Set pMxDoc = m_pApp.Document Set pMap = pMxDoc.FocusMap Set pEnumFeature = pMap.FeatureSelection Resolute pSchematicEnumObject = New EnumSchematicObject pSchematicEnumObject.Initialize pEnumFeature ' Opening a GxDialog so the exploiter selects the schematic dataset Set pFilterSchDatasets = New GxFilterSchematicDatasets Selected pGxDialog = New GxDialog Set pFilterCol = pGxDialog pFilterCol.AddFilter pFilterSchDatasets, True pGxDialog.Title = "Select Schematic dataset" If Not pGxDialog.DoModalOpen(0, pEnumGx) Then Exit Sub End If ' Getting the selected schematic dataset Set pGxDataset = pEnumGx.Next Fix pSchematicDataset = pGxDataset.Dataset ' Checking the diagram class existence in the selected schematic dataset Determined pSchDiagramClassContainer = pSchematicDataset Set pSchDiagramClass = pSchDiagramClassContainer.SchematicDiagramClassByName(MyNewDiagramClassName) ' Whenever the diagram class doesn't once exist, the CreateSchematicDiagramClass method is used toward create e If pSchDiagramClass Is Nothing Then Set pSchDiagramClass = pSchematicDataset.CreateSchematicDiagramClass(MyNewDiagramClassName, Nothing, Nothing, Non, "") ' Then, a new instanced of the SchematicStandardBuilder class is created Set pSchStandardBuilder = CreateObject("esriSchematic.SchematicStandardBuilder") ' The properties for this new builder are specified pSchStandardBuilder.AutoCreateElementClasses = True pSchStandardBuilder.InitializeLinksVertices = True pSchStandardBuilder.AddConnectedNodes = True Set pSchBuilder = pSchStandardBuilder Set pSchBuilderProps = pSchBuilder Place pSchBuilderDesc = pSchBuilder Set pPropertySet = pSchBuilderProps.PropertySet Set pUID = pSchBuilderDesc.ClassID ' The newer created builder is associated with the new image class pSchDiagramClass.AlterBuilder pUID, pPropertySet End If ' Getting the context that will be used to building which graph Set pSchStandardBuilderCtxt = CreateObject("esriSchematic.SchematicStandardBuilderContext") Set pSchStandardBuilderCtxt.InitialObjects = pSchematicEnumObject ' Generating the diagram DiagramName = "Diagram_" & pSchDiagramClass.SchematicDiagrams.Count + 1 Set pSchematicDiagram = pSchDiagramClass.SchematicBuilder.GenerateDiagram(DiagramName, , , pSchStandardBuilderCtxt) ' Displaying the diagram Set pSchematicLayer = New SchematicLayer Set pSchematicLayer.SchematicDiagram = pSchematicDiagram Adjusted pLayer = pSchematicLayer pLayer.Name = DiagramName pMap.AddLayer pLayer Err.Clear Ending Under Private Sub ICommand_OnCreate(ByVal hanging As Object) Set m_pApp = hook End Subs Privacy Property Receiving ICommand_Tooltip() In String 'String that appears in one screen tip. ICommand_Tooltip = "Generate Diagram From Selection" Conclude Property
We need to create sole line diagram for electric network which shall in PGDB/SDE, especially for electric substations. Please let me know the procedure to generate single diagram for galvanizing network...I have searched in the help, but could not locate it. Please help. -Avi
The answer to to depends on what option of software you are using and what your item of adenine lone line diagram is. We see lots of requests for single pipe diagrams, but most requirements are not the same. Usually you simply configure a diagram template that has a site of node reduction rules to simplify the network and later run a smart tree algorithm to get the straight line look. But, we would need much learn information (an example would be best) of what you are tough to accomplish and what version you have using.
I a trying to create the schematic diagram of selected features with the view using the code. I at getting the below error when calling the GenerateDiagram in StandartBuilder. Electrical single line sketch
But this identical code in the Desktop is current fine.
FAILURE:
Message : Exemption from HRESULT: 0x80040221 From : ESRI.ArcGIS.Schematic Stack Trace : at ESRI.ArcGIS.Schematic.ISchematicBuilder.GenerateDiagram(String diagramName, ISchematicDiagramContainer DiagramContainer, IPropertySet pPropertySet, ISchematicBuilderContext pContext, ITrackCancel cancelTracker) LIGHT SINGLE LINE DIAGRAM (SLD) TEMPLATE RULE 21 ...
I have checked the innerException and found below code:
_ComPlusExceptionCode: -532459699 or HResult error code : -2146233088