Anuncios
Atención para clientes sin autenticación multifactor o inicio de sesión único: la verificación OTP se implementará en abril de 2025. Lee todo al respecto aquí.
reylorente1
en respuesta a: snajjar

Thanks for your answer, really the correct method (function) is this..., 

 

 

public List<ElementId> RunStepThroughElements()
        {
            if (pPrev != null)
            {
                ConnectorSet pConnset = GetConnectors(pPrev);
                foreach (Connector pConn in pConnset)
                {
                    if (pConn.IsConnected)
                    {
                        // Get the connector connected to current connector
                        c = GetConnectedConnector(pConn);
                        if (c != null)
                        {
                            Element prNext = c.Owner;
                            m_lVistited.Add(prNext.Id);
                            pPrev = prNext;
                        }
                    }
                }
                m_iLoops++;
            }
            if ((m_lVistited.Count < m_lSelectedElts.Count)
                       && (m_iLoops < MAX_LOOPS))
            {
                RunStepThroughElements();
            }
            return m_lVistited;
        }

 

although I know that m_iLoops++;
....
 && (m_iLoops < MAX_LOOPS)) is not recommended, That value of 21, is a test, to see if the Shower Tank node was selected.
Thanks for your suggestion