Replicate Graphical Column Schedule Sort Order

simon.lewisPC7GZ
Explorer
Explorer

Replicate Graphical Column Schedule Sort Order

simon.lewisPC7GZ
Explorer
Explorer

Hi,

 

I am trying to write an add-in with C# to automate the process of sequentially labeling structural columns to match the sequence in the graphical column schedule.

 

I have written the following code to get all the concrete columns in the project and then create a list of their Column Location Marks (ie A(2000)-1(2150) )  (Built-in Category):

 

ElementCategoryFilter filter = new ElementCategoryFilter(BuiltInCategory.OST_StructuralColumns);
StructuralMaterialTypeFilter filter_mat = new StructuralMaterialTypeFilter(StructuralMaterialType.Concrete);

IList<Element> columns = collector.WherePasses(filter).WherePasses(filter_mat).WhereElementIsNotElementType().ToElements();

List<XYZ> locations = new List<XYZ>();
List<string> colmarks = new List<string>();

foreach (Element ele in columns)
{
string colmark = ele.get_Parameter(BuiltInParameter.COLUMN_LOCATION_MARK).AsString();
colmarks.Add(colmark);
}

colmarks.Sort();

 

My trouble comes at this point. The colmarks.Sort() method does not match the order of the columns in the graphical column schedule.

 

I have also tried sorting the columns by their XYZ location which doesn't match the order in the graphical column schedule either.

 

Can anyone provide any insight into how the graphical column schedule orders the columns and how I can replicate this.

 

Thanks

 

0 Likes
Reply
Accepted solutions (1)
684 Views
1 Reply
Reply (1)

jeremytammik
Autodesk
Autodesk
Accepted solution

Please ignore; this is a duplicate of the thread 

 

https://forums.autodesk.com/t5/revit-api-forum/replicate-graphical-column-schedule-sort-order-with-c...

 

The full discussion and answers are to be found there.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes