среда, 23 сентября 2015 г.

how to export all comments from visio drawing into text table:

how to export all comments from visio drawing into text table:

https://support.microsoft.com/en-us/kb/898514

Public Sub GetComments()
Dim pagMarkup As Visio.Page
Dim pag As Visio.Page
Dim shp As Visio.Shape
Dim sText As String
Dim iRow As Integer

Set pag = Visio.ActivePage
sText = "Reviewer" & vbTab & "Date" & vbTab & "Comment"

If pag.PageSheet.SectionExists(Visio.visSectionAnnotation, Visio.visExistsAnywhere) Then
For iRow = 0 To pag.PageSheet.RowCount(Visio.visSectionAnnotation) - 1
sText = sText & vbCrLf & pag.Document.DocumentSheet.CellsSRC(Visio.visSectionReviewer, pag.PageSheet.CellsSRC(Visio.visSectionAnnotation, iRow, Visio.visAnnotationReviewerID).ResultIU - 1, Visio.visReviewerInitials).ResultStr("")
sText = sText & pag.PageSheet.CellsSRC(Visio.visSectionAnnotation, iRow, Visio.visAnnotationMarkerIndex).ResultIU
sText = sText & vbTab & Format(pag.PageSheet.CellsSRC(Visio.visSectionAnnotation, iRow, Visio.visAnnotationDate).ResultIU, "ddddd")
sText = sText & vbTab & pag.PageSheet.CellsSRC(Visio.visSectionAnnotation, iRow, Visio.visAnnotationComment).ResultStr("")
Next iRow
End If

For Each pagMarkup In pag.Document.Pages
If pagMarkup.Type = visTypeMarkup Then
If pagMarkup.OriginalPage = pag Then
If pagMarkup.PageSheet.SectionExists(Visio.visSectionAnnotation, Visio.visExistsAnywhere) Then
sText = sText & vbCrLf
sText = sText & vbCrLf & pag.Document.DocumentSheet.CellsSRC(Visio.visSectionReviewer, pagMarkup.ReviewerID - 1, Visio.visReviewerName).ResultStr("")
For iRow = 0 To pagMarkup.PageSheet.RowCount(Visio.visSectionAnnotation) - 1
sText = sText & vbCrLf & pag.Document.DocumentSheet.CellsSRC(Visio.visSectionReviewer, pagMarkup.PageSheet.CellsSRC(Visio.visSectionAnnotation, iRow, Visio.visAnnotationReviewerID).ResultIU - 1, Visio.visReviewerInitials).ResultStr("")
sText = sText & pagMarkup.PageSheet.CellsSRC(Visio.visSectionAnnotation, iRow, Visio.visAnnotationMarkerIndex).ResultIU
sText = sText & vbTab & Format(pagMarkup.PageSheet.CellsSRC(Visio.visSectionAnnotation, iRow, Visio.visAnnotationDate).ResultIU, "ddddd")
sText = sText & vbTab & pagMarkup.PageSheet.CellsSRC(Visio.visSectionAnnotation, iRow, Visio.visAnnotationComment).ResultStr("")
Next iRow
End If
End If
End If
Next pagMarkup

Dim iAutoSize as Integer 'new
iAutoSize = pag.AutoSize 'new
pag.AutoSize = 0 'new
Set shp = pag.DrawRectangle(-pag.PageSheet.Cells("PageWidth").ResultIU, 0, 0, pag.PageSheet.Cells("PageHeight").ResultIU)
pag.AutoSize = iAutoSize 'new
shp.AddSection visSectionUser 'new
shp.AddNamedRow visSectionUser, "msvNoAutoSize", visTagDefault 'new
shp.CellsU("User.msvNoAutoSize").FormulaU = 1 'new
shp.Cells("Para.HorzAlign").Formula = "0"
shp.Cells("VerticalAlign").Formula = "0"
shp.Name = "Reviewers Comments"
shp.Text = sText
End Sub

пятница, 11 сентября 2015 г.

IOS XRv 532 (5.3.2) Released

For those of you who is interested, it's available here with your Cisco account.

четверг, 10 сентября 2015 г.

FHRP (HSRP/VRRP/GLBP/CARP) on VMWare Switches

Although it's rather well-known, that in order to get any FHRP protocol to work, you need to enable promiscuous mode, i've run into the situations, when this does not help.
If you have also faced troubles with FHRP VIP being ureachable within the LAN segment, this command may help you in workarounding the issue:

RP/0/0/CPU0:DCS-PE1#sh run router hsrp interface GigabitEthernet0/0/0/2.200
Thu Sep 10 13:55:31.728 UTC
router hsrp
 interface GigabitEthernet0/0/0/2.200
  address-family ipv4
   hsrp 200 slave
    follow mastergroup
    mac-address 0050.56b1.d9d0
    address 10.216.1.161
   !
  !
 !
!