Jay Peak provides some enhancements to the ‘ProfileView’ object. One of them is the ability to create multiple profile views at once. The code is very simple, since it is just one straight call to a static method of ‘ProfileView’. Yet, it is a very powerful call since it takes a ‘MultipleProfileViewsCreationOptions’ object that allows to customize the behavior of the profile views being created. The following code shows how to create multiple profile views.
private void createProfileViews()
private MultipleProfileViewsCreationOptions _creationOptions
MultipleProfileViewsCreationOptions options =
options.DrawOrder = ProfileViewPlotType.ByRows;
options.GapBetweenViewsInColumn = 1000;
options.GapBetweenViewsInRow = 1000;
options.MaxViewInRowOrColumn = 3;
Private Sub createProfileViews()
Private ReadOnly Property _creationOptions() _
Dim options As New MultipleProfileViewsCreationOptions()
options.DrawOrder = ProfileViewPlotType.ByRows
options.GapBetweenViewsInColumn = 1000
options.GapBetweenViewsInRow = 1000
options.MaxViewInRowOrColumn = 3
options.StartCorner = ProfileViewStartCornerType.UpperLeft
We use an alignment id, an insertion point, and the ‘MultipleProfileViewsCreationOptions’ object to create the multiple views. The ‘MultipleProvileViewsCreationOption’ object allows you to customize the draw order of the profile views, and things like the gap between rows and columns, maximum views in each row or column (depending on the draw order option), and the start corner to which the insertion point refers. The ‘CreateMultiple’ method provides other overloads that allow you to customize further how the views are created.
You can download the entire implementation of the command from the Civilized Development repository at BitBucket.