Visio Static Connectors - How do you place them?

NL3294

I have two shapes, with connection points. I am using my own master for the two shapes, so I know the names of the connection points.

I'd like to make an arrow that connects one connection point (from) to another connection point in the second shape. Seems like a basic thing to do, but I can only find documentation or sample code for dynamic connectors, which don't let you choose the connection points. I downloaded and searched the Visio Code Samples Library, and I can't find anything on this.

In short, I'd like a function that does something like this:

//drop a connector onto the page, then connect them
public void dropStaticConnector(Shape sFrom, String connectionPointName1, Shape sTo, String connectionPointName2)
{
}

Can someone give sample code?

Nikolay

You could try something like the following:

//drop a connector onto the page, then connect them
public void dropStaticConnector(
    Shape sFrom, String connectionPointName1, 
    Shape sTo, String connectionPointName2)
{
    // drop a default connector
    var conn = ActivePage.Drop(Application.ConnectorToolDataObject, 0, 0);

    // glue it to the connection points
    conn.Cells("BeginX").GlueTo(sFrom.Cells("Connections." + connectionPointName1));
    conn.Cells("EndX").GlueTo(sTo.Cells("Connections." + connectionPointName2));
}

Means, you need to go the "old-fashioned" way. The new one is Shape.AutoConnect, but afaik it will not guarantee that the shapes will be glued to the connection point of your choice.

Here is the related article from DVS (Developing Viso Solutions) book - it still applies: http://msdn.microsoft.com/en-us/library/office/aa201778.aspx

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

How do you create a static class in C++?

分類Dev

OpenXml pivot table: how do you read the total and subtotals in order to display them?

分類Dev

OpenXml pivot table: how do you read the total and subtotals in order to display them?

分類Dev

How do you mark MP3 files so that Windows Phone (Zune software) treats them as Podcasts?

分類Dev

How do you password protect static content in JBoss 3 with Jetty 4?

分類Dev

Can you declare a member function and make them do different things?

分類Dev

Diagrammer: how to add labels to mermaid connectors

分類Dev

How to create connectors for Kafka-connect on Kubernetes?

分類Dev

How do I resize partitions and filesystems on them?

分類Dev

How do you reverse a dictionary?

分類Dev

How do you use ColabTurtle?

分類Dev

How do you use ColabTurtle?

分類Dev

"Warning: Do not place Android context classes in static fields; this is a memory leak (and also breaks Instant Run)"

分類Dev

Warning: Do not place Android context classes in static fields; this is a memory leak (and also breaks Instant Run)

分類Dev

How to do a "element by element in-place inverse" with pytorch?

分類Dev

How do I place two JSX elements next to each other?

分類Dev

How do I place a text over a image in a button in WinRT

分類Dev

How do you check which version of Meteor you are running?

分類Dev

How do you confirm if .htaccess if working fine?

分類Dev

How do you right align a horizontal UIStackView?

分類Dev

How do you represent a JSON array of strings?

分類Dev

How do you sort a dictionary by value?

分類Dev

How do you sort a dictionary by value?

分類Dev

How do you sort a dictionary by value?

分類Dev

How do you merge two Git repositories?

分類Dev

How do you confirm django is using memcached?

分類Dev

How do you use multiple controllers in CodeIgniter?

分類Dev

How do you put and control a checkbox in an NSTableView?

分類Dev

How do you allow GADTs in Haskell?

Related 関連記事

  1. 1

    How do you create a static class in C++?

  2. 2

    OpenXml pivot table: how do you read the total and subtotals in order to display them?

  3. 3

    OpenXml pivot table: how do you read the total and subtotals in order to display them?

  4. 4

    How do you mark MP3 files so that Windows Phone (Zune software) treats them as Podcasts?

  5. 5

    How do you password protect static content in JBoss 3 with Jetty 4?

  6. 6

    Can you declare a member function and make them do different things?

  7. 7

    Diagrammer: how to add labels to mermaid connectors

  8. 8

    How to create connectors for Kafka-connect on Kubernetes?

  9. 9

    How do I resize partitions and filesystems on them?

  10. 10

    How do you reverse a dictionary?

  11. 11

    How do you use ColabTurtle?

  12. 12

    How do you use ColabTurtle?

  13. 13

    "Warning: Do not place Android context classes in static fields; this is a memory leak (and also breaks Instant Run)"

  14. 14

    Warning: Do not place Android context classes in static fields; this is a memory leak (and also breaks Instant Run)

  15. 15

    How to do a "element by element in-place inverse" with pytorch?

  16. 16

    How do I place two JSX elements next to each other?

  17. 17

    How do I place a text over a image in a button in WinRT

  18. 18

    How do you check which version of Meteor you are running?

  19. 19

    How do you confirm if .htaccess if working fine?

  20. 20

    How do you right align a horizontal UIStackView?

  21. 21

    How do you represent a JSON array of strings?

  22. 22

    How do you sort a dictionary by value?

  23. 23

    How do you sort a dictionary by value?

  24. 24

    How do you sort a dictionary by value?

  25. 25

    How do you merge two Git repositories?

  26. 26

    How do you confirm django is using memcached?

  27. 27

    How do you use multiple controllers in CodeIgniter?

  28. 28

    How do you put and control a checkbox in an NSTableView?

  29. 29

    How do you allow GADTs in Haskell?

ホットタグ

アーカイブ