次の方法で共有

VISIO VBA shapeの座標取得

Anonymous
2020-08-18T09:48:09+00:00

For Each vsoPage In vsoDoc.Pages

            For Each vsoShape In vsoPage.Shapes

              name = vsoShape.Name

    X = vsoShape.???

              Y = vsoShape.???

            Next

        Next

たとえば

name = vsoShape.Name

のように各シェイプのnameを取得することはできますが、

各シェイプのシート上の座標(XY座標?row, column?)を取得することはできるでしょうか。

Microsoft 365 と Office | Visio | Other | Other
Microsoft 365 と Office | Visio | Other | Other

ユーザーがわかりやすい図を使用して複雑な情報を視覚化するのに役立つプロフェッショナルな図作成ツール。

ロックされた質問。 この質問は、Microsoft サポート コミュニティから移行されました。 役に立つかどうかに投票することはできますが、コメントの追加、質問への返信やフォローはできません。

0 件のコメント コメントはありません

1 件の回答

並べ替え方法: 最も役に立つ
  1. Anonymous
    2020-08-24T09:18:04+00:00

    > 各シェイプのシート上の座標(XY座標?row, column?)を取得


    Dim vsoDoc As Visio.Document

    Dim vsoPage As Visio.Page

    Dim vsoShape As Visio.Shape

    Dim intDiagramServices As Integer

    Set vsoDoc = ActiveDocument

    intDiagramServices = vsoDoc.DiagramServicesEnabled

    vsoDoc.DiagramServicesEnabled = visServiceAll

    For Each vsoPage In vsoDoc.Pages

        Debug.Print vsoPage.Name

        For Each vsoShape In vsoPage.Shapes

            Debug.Print vbTab & vsoShape.Name

            With vsoShape**.Cells**("PinX")

                Debug.Print String(2, vbTab) & .Name & ": " & .FormulaU

            End With

            With vsoShape**.Cells**("PinY")

                Debug.Print String(2, vbTab) & .Name & ": " & .FormulaU

            End With

        Next

    Next

    vsoDoc.DiagramServicesEnabled = intDiagramServices


    以上のようなことをなさりたい、ということでしょうか。

    この回答は役に立ちましたか?

    0 件のコメント コメントはありません