Tôi đang cố tạo lập trình thời gian và điểm đánh dấu bằng cách sử dụng Interio 2010 COM Interops. Mã của tôi dựa trên bài đăng trên blog 2 phần của Chris Castillo (Part 1, Part 2), là ví dụ duy nhất hoàn chỉnh mà tôi đã có thể tìm thấy về cách thực hiện việc này. Tuy nhiên, blog của anh (từ năm 2004) dường như không hoạt động đúng. Các cột mốc không thực sự được kết nối với dòng thời gian và việc cập nhật ngày của chúng không khiến chúng di chuyển đến đúng vị trí.Làm thế nào để tôi lập trình thả mốc thời gian vào một mốc thời gian khối trong Visio
Bất kỳ đề xuất hoặc bản sửa lỗi nào?
Imports Microsoft.Office.Interop.Visio
Imports System.Diagnostics.CodeAnalysis
Imports System.Runtime.InteropServices
...
Dim VisioApp As New Application
Dim myDoc As Document = VisioApp.Documents.Add("")
Dim myPage As Page = myDoc.Pages.Item(1)
Dim TimelineStencils As Document =
VisioApp.Documents.Add("Timeline Shapes.vss")
Dim theTimeline As Shape
Dim theMilestone As Shape
VisioApp.AlertResponse = 1
theTimeline = myPage.Drop(
TimelineStencils.Masters.ItemU("Block timeline"), 5.610236, 5.511811)
theTimeline.CellsU("User.visBeginDate").FormulaU = _
VisioApp.ConvertResult(
"1/1/2004", VisUnitCodes.visDate, VisUnitCodes.visInches)
theTimeline.CellsU("User.visEndDate").FormulaU = _
VisioApp.ConvertResult(
"12/31/2004", VisUnitCodes.visDate, VisUnitCodes.visInches)
VisioApp.Addons("ts").Run("/cmd=3")
theMilestone = myPage.Drop(_
TimelineStencils.Masters.ItemU("Line milestone"), _
5.610236, 5.511811)
theMilestone.CellsU("User.visMilestoneDate").FormulaU = _
VisioApp.ConvertResult(
"7/1/2004", VisUnitCodes.visDate, VisUnitCodes.visInches)
VisioApp.AlertResponse = 0
Và đối với bất kỳ ai đang đấu tranh với tất cả điều này, đây là hướng dẫn bật Chế độ nhà phát triển, cho phép ShapeSheets http://www.visguy.com/2008/08/04/top-9-reasons-for-turning -trình phát triển-chế độ –