02-12-2022
05:57 AM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
02-12-2022
05:57 AM
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