API Help
Eplan.EplApi.DataModel.Topology Namespace / Segment Class / Create Method / Create(Project,SymbolReference,SymbolReference) Method
Project to which this object will be assigned. Can't be null.
Symbol which will be assign as beggining of segment.
Symbol which will be assign as end of segment.
Example

In This Topic
    Create(Project,SymbolReference,SymbolReference) Method
    In This Topic
    Creates new unplaced segment and assign to it start and end symbol.
    Syntax

    Parameters

    pProject
    Project to which this object will be assigned. Can't be null.
    pStartSymbol
    Symbol which will be assign as beggining of segment.
    pEndSymbol
    Symbol which will be assign as end of segment.
    Exceptions
    ExceptionDescription
    Thrown when pProject is null.
    Thrown when the Segment cannot be created.
    Thrown when internal error has occured. Please see the exception message for details.
    Remarks
    After using this method members StartPoint and EndPoint are not automaticly updated. To update it, please use method UpdatePage() or UpdateTopologySegment() of class Eplan.EplApi.HEServices.TopologyService
    Example
    The following example shows how to use this method.
    //create segments
    Segment oSegment1 = new Segment();
    oSegment1.Create(m_oTestProject, oTopologyFunc1, oCorner1);
    oSegment1.Page = oTopologyPage;
    
    Segment oSegment2 = new Segment();
    oSegment2.Create(m_oTestProject, oCorner1, oCorner2);
    oSegment2.Page = oTopologyPage;
    
    Segment oSegment3 = new Segment();
    oSegment3.Create(m_oTestProject, oCorner2, oTopologyFunc2);
    oSegment3.Page = oTopologyPage;
    
    //update start and end points of segments
    new TopologyService().UpdatePage(oTopologyPage);
    
    
    See Also