Share via


Shape.RowType プロパティ (Visio)

[Geometry]、[Connection Points]、[Controls]、または [Tabs] の各シェイプシート セクションに対して、行の種類を取得または設定します。 値の取得と設定が可能です。

構文

RowType (セクション)

Shape オブジェクトを表す変数。

パラメーター

名前 必須 / オプション データ型 説明
Section 必須 Integer 行を含むセクションのインデックスです。
必須 Integer 行のインデックスです。

戻り値

整数

注釈

行の種類を変更すると、新しい行の種類で同じセルを使用できなくなる場合があります。 新しいセルまたは変更したセルに適切な数式を指定する必要があります。

Visio タイプ ライブラリのメンバー VisRowTags で宣言されている以下のいずれかの定数に RowType を設定すると、行の種類を指定できます。

定数
visTagComponent 137
visTagMoveTo 138
visTagLineTo 139
visTagArcTo 140
visTagInfiniteLine 141
visTagEllipse 143
visTagEllipticalArcTo 144
visTagSplineBeg 165
visTagSplineSpan 166
visTagPolylineTo 193
visTagNURBSTo 195
visTagTab0 136
visTagTab2 150
visTagTab10 151
visTagTab60 181
visTagCnnctPt 153
visTagCnnctNamed 185
visTagCtlPt 162
visTagCtlPtTip 170

不適切な行タグが渡された場合、または行が存在しない場合は、何も変更されず、エラーが返されます。

[Connection Points] 行を名前なしから名前付きに変更するには、RowName プロパティを使用します。

有効な行定数の一覧については VisRowIndices を、有効な行タグ定数の一覧については VisRowTags を参照してください。

有効なセクション定数の一覧については、「 VisSectionIndices 」を参照してください。

この VBA (Microsoft Visual Basic for Applications) マクロは、RowType プロパティを使用して、シェイプシートの行の種類を変更する方法を示します。 ページに長方形、円弧、または曲線を描き、図形の辺を円弧に変換して四角形の辺を曲線にします。 これには、四角形の各辺でシェイプシート行の種類を LineTo から ArcTo に変更し、各行の [X] セルと [Y] セルの値を変更します。

 
Public Sub RowType_Example() 
 
 Dim vsoPage As Visio.Page 
 Dim vsoShape As Visio.Shape 
 Dim vsoCell As Visio.Cell 
 Dim strBowCell As String 
 Dim strBowFormula As String 
 Dim intCounter As Integer 
 
 'Set the value of the strBowCell string. 
 strBowCell = "Scratch.X1" 
 
 'Set the value of the strBowFormula string. 
 strBowFormula = "=Min(Width, Height) / 5" 
 Set vsoPage = ActivePage 
 
 'If there isn't an active page, set vsoPage 
 'to the first page of the active document. 
 If vsoPage Is Nothing Then 
 
 Set vsoPage = ActiveDocument.Pages(1) 
 
 End If 
 
 'Draw a rectangle on the active page. 
 Set vsoShape = vsoPage.DrawRectangle(1, 5, 5, 1) 
 
 'Add a scratch section and add a row to the scratch section. 
 vsoShape.AddSection visSectionScratch 
 vsoShape.AddRow visSectionScratch, visRowScratch, 0 
 
 'Set vsoCell to the Scratch.X1 cell and set its formula. 
 Set vsoCell = vsoShape.Cells(strBowCell) 
 vsoCell.formula = strBowFormula 
 
 'Bow in or curve the rectangle's lines by changing 
 'each row type from LineTo to ArcTo and entering the bow value. 
 For intCounter = 1 To 4 
 
 vsoShape.RowType(visSectionFirstComponent, visRowVertex + intCounter) = visTagArcTo 
 Set vsoCell = vsoShape.CellsSRC(visSectionFirstComponent, visRowVertex + intCounter, 2) 
 vsoCell.formula = "-" & strBowCell 
 
 Next intCounter 
 
End Sub

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。