Community
C3D 2016 / 2017 . C#
Existing corridor; getting subassemblies.
How do you order the applied subassemblies in an applied assembly?
I need to order by station and by offset.
I guess I need to store in a collection then order - order by OriginStationOffsetElevationToBaseline.X then by OriginStationOffsetElevationToBaseline.Y ascending; but how is this done?
Please provide sample code lines.
Thanks,
Kevin.
Solved! Go to Solution.
Solved by flycoflyco. Go to Solution.
Snippet
foreach (double indexdouble in StationSorted) { List<Subassembly> SubassemblyList = new List<Subassembly>(); AppAssem = Currbaseline.GetAppliedAssemblyAtStation(indexdouble); AppSubassemColl = AppAssem.GetAppliedSubassemblies(); using(doc.LockDocument()) { using(Transaction tr2 = db.TransactionManager.StartTransaction()) { foreach (AppliedSubassembly indexAppSub in AppSubassemColl) {
} tr2.Commit(); } }