Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

corridor applied subassemblies order by station and by offset

1 REPLY 1
SOLVED
Reply
Message 1 of 2
kbarnettza
420 Views, 1 Reply

corridor applied subassemblies order by station and by offset

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.

 

1 REPLY 1
Message 2 of 2
flycoflyco
in reply to: kbarnettza

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();         }     }  

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report