Created
January 30, 2024 09:49
-
-
Save chuongmep/b06b2156427f5dd769f51ea636b4892c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get all reference with connector 1 | |
List<Autodesk.Revit.DB.Connector> connectorSets = connectors1.Select(x => x.AllRefs) | |
.SelectMany(x => x.Cast<Autodesk.Revit.DB.Connector>()) | |
.ToList(); | |
// disconnect all reference with connector 1 | |
connectors1.ForEach(x => | |
{ | |
connectorSets.ForEach(a => | |
{ | |
if (x.IsConnectedTo(a)) | |
{ | |
x.DisconnectFrom(a); | |
} | |
}); | |
}); | |
// regenerate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment