Configure Visio TimeLine Shapes
Set Milestone Shape Properties
Aspose.Diagram allows developers to set milestone properties. This article shows how to set the milestone date, date format, auto update flag and type.
Setting Milestone Date, Date Format, Auto Update Flag and Type
The MilestoneHelper class takes a Shape object while initializing the MilestoneHelper object. The code example in this article sets the milestone date, date format, auto update flag and milestone type properties.
The process for updating the milestone date, date format, auto update flag and milestone type:
- Load a diagram.
- Find a particular shape.
- Initialize the MilestoneHelper object.
- Set a milestone date.
- Set the milestone date format.
- Set an auto update flag.
- Set the milestone type
- Save the Visio drawing to any supported format.
Set Milestone Programming Sample
Table of date format values:
Value | Format String |
---|---|
0 | dddd, yyyy-M-d |
1 | yyyy-MM-dd |
2 | yy-MMM-d |
3 | yyyy/M/d |
4 | yy-MMM.-d |
5 | d MMMM yyyy |
6 | yy-M |
7 | MMM-yy |
8 | MMMM d, yyyy |
9 | MMM d, yyyy |
10 | M-d-yy |
11 | M-d |
12 | d MMMM, yyyy |
13 | d MMM, yyyy |
14 | d-M-yy |
15 | d-M |
16 | yy-M-d |
17 | yyyy-M-d |
18 | M-yy |
19 | M-yyyy |
20 | MMMM yyyy |
21 | MMMM yy |
22 | MMM yyyy |
23 | MMM yy |
24 | yy |
25 | yyyy |
26 | d |
27 | MMMM |
28 | MMM |
29 | M |
Set Time Period and Date Format of Timeline Shape
Aspose.Diagram allows developers to configure the timeline programmatically. This explains how to adjust the time period and date format of timeline shapes (block, line, ruler, divided, or cylindrical).
Setting Time Period and Date Format
The TimeLineHelper class takes a Shape object when initializing the TimeLineHelper object. The code example in this article sets the time period start, end and date format values.
The process for updating time period start, end and date format is:
- Load a diagram.
- Find a particular shape.
- Initialize the TimeLineHelper object.
- Set the time period start.
- Set the time period end.
- Set a date format.
- Save the Visio drawing to any supported format.
Set Time Period and Date Programming Sample
Table of date format values:
Value | Format String |
---|---|
0 | dddd, yyyy-M-d |
1 | yyyy-MM-dd |
2 | yy-MMM-d |
3 | yyyy/M/d |
4 | yy-MMM.-d |
5 | d MMMM yyyy |
6 | yy-M |
7 | MMM-yy |
8 | MMMM d, yyyy |
9 | MMM d, yyyy |
10 | M-d-yy |
11 | M-d |
12 | d MMMM, yyyy |
13 | d MMM, yyyy |
14 | d-M-yy |
15 | d-M |
16 | yy-M-d |
17 | yyyy-M-d |
18 | M-yy |
19 | M-yyyy |
20 | MMMM yyyy |
21 | MMMM yy |
22 | MMM yyyy |
23 | MMM yy |
24 | yy |
25 | yyyy |
26 | d |
27 | MMMM |
28 | MMM |
29 | M |
Refresh Milestones on the Timeline in Visio
Aspose.Diagram allows developers to adjust milestones on the timeline shapes (block, line, ruler, divided, or cylindrical) according to the time period change.
Refresh Milestones on the Timeline using TimeLineHelper class
The RefreshTimeLine method exposed by the TimeLineHelper class can be used to revive milestones on the timeline.
The code below shows how to:
- load a sample diagram.
- get a timeline shape.
- initialize the TimeLineHelper object.
- set the time period start.
- set the time period end.
- set date format (optional).
- call RefreshTimeLine method of the TimeLineHelper object.
- save diagram
Refresh Milestones using TimeLineHelper Programming Sample
Use the following code in your .NET application to revive milestones on the timeline using Aspose.Diagram for .NET.
Refresh Milestones on the Timeline using MilestoneHelper class
The RefreshMilestone method exposed by the MilestoneHelper class can be used to refresh milestones on the timeline.
The code below shows how to:
- load a sample diagram.
- get a timeline shape.
- add Shape in Visio diagram using AddShape method.
- initialize the MilestoneHelper object.
- set Milestone Date.
- set Milstone’s IsAutoUpdate property to true.
- call RefreshMilestone method of the MilestoneHelper object.
- save diagram
Refresh Milestones using MilestoneHelper Programming Sample
Use the following code in your .NET application to refresh milestones on the timeline using Aspose.Diagram for .NET.