Is there a way to figure out which grid segment is the start of a MultiSegmentGrid and which is the end? I've noticed the GetGridIds function returns an unordered list of element id's. I don't think checking which grids only have an unjoined start point will work because both the start and end grid could have unjoined start points depending on how the user drew them.
Dear Paul,
Thank you for your query.
I am sorry to say that I do not know off-hand, nor can I figure anything out, not having anything tangible to start from.
I do not even know what the ‘start’ and the ‘end’ of a MultiSegmentGrid might be.
How would you define that?
Just from looking at the Revit API help file description of the MultiSegmentGrid, though, I see that "this element acts as a multi-segmented Grid. The individual grids associated to the MultiSegmentGrid behave as a single unit and all share the same text. They inherit their type (GridType) from the MultiSegmentGrid."
Using the MultiSegmentGrid.GetMultiSegementGridId method, you can determine the relationships back and forth between a MultiSegmentGrid and its member grids.
Since each member grid is a normal Revit element, I assume it has a location and bounding box.
If your definition of 'start' and end' has anything whatsoever to do with geometry, such as location, X and Y coordinates, etc., then this information enables you to implement whatever sorting and start and end identification you like.
To summarise:
I hope this helps.
Best regards,
Jeremy