N
Nadav
hi there,
i' trying to work with timeline and time intervals , but
for some reason, the moment the timeline is dropped onto
the drawing page an exception is thrown and the object
seems to malform in the future
i even tried to check it very basiclly with "record
macro" , but the situation remains the same
thank u ,
i'm using the code:
Sub add_timeline(ByVal begDate As String, ByVal endDate
As String, numIntervals As Integer)
Dim theTimeline, shpObj As shape
Dim mstTm As Master
Dim stnObj As Document
Dim apage As Visio.Page
Application.AlertResponse = 0
Application.Windows.ItemEx(<filename>).Activate
Set stnObj = Documents("timeln_m.vss")
Set mstrObj = stnObj.Masters("Cylindrical timeline")
Set apage = ThisDocument.Pages(1)
Set theTimeline = apage.Drop(mstrObj, 3.444882, 7.283465)
theTimeline.Cells("User.visTimeScale").Formula = 7 '
set time scale to qrts
theTimeline.CellsU("User.visBeginDate").FormulaU = _
Application.ConvertResult(begDate,
VisUnitCodes.visDate, VisUnitCodes.visInches)
'begDate
theTimeline.CellsU("User.visEndDate").FormulaU = _
Application.ConvertResult(endDate,
VisUnitCodes.visDate, VisUnitCodes.visInches) '
VisUnitCodes.visInches) ' endDate
.....
i' trying to work with timeline and time intervals , but
for some reason, the moment the timeline is dropped onto
the drawing page an exception is thrown and the object
seems to malform in the future
i even tried to check it very basiclly with "record
macro" , but the situation remains the same
thank u ,
i'm using the code:
Sub add_timeline(ByVal begDate As String, ByVal endDate
As String, numIntervals As Integer)
Dim theTimeline, shpObj As shape
Dim mstTm As Master
Dim stnObj As Document
Dim apage As Visio.Page
Application.AlertResponse = 0
Application.Windows.ItemEx(<filename>).Activate
Set stnObj = Documents("timeln_m.vss")
Set mstrObj = stnObj.Masters("Cylindrical timeline")
Set apage = ThisDocument.Pages(1)
Set theTimeline = apage.Drop(mstrObj, 3.444882, 7.283465)
theTimeline.Cells("User.visTimeScale").Formula = 7 '
set time scale to qrts
theTimeline.CellsU("User.visBeginDate").FormulaU = _
Application.ConvertResult(begDate,
VisUnitCodes.visDate, VisUnitCodes.visInches)
'begDate
theTimeline.CellsU("User.visEndDate").FormulaU = _
Application.ConvertResult(endDate,
VisUnitCodes.visDate, VisUnitCodes.visInches) '
VisUnitCodes.visInches) ' endDate
.....