Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add connector to Ethernet shape

Status
Not open for further replies.

msc0tt

IS-IT--Management
Jun 25, 2002
281
CA
Hello,
Yes, this has only been asked 1000 times before... but it is the first time I've posted the question to TekTips, and there is no current posting on this topic.

I use Visio 2000 for LAN diagrams. Please don't suggest gluing multiple Ethernet shapes together (sad, sad, sad...). I've looked at the shapesheet, and it is clear which rows need to be added to which section, and which new sections need to be added. I want to write a macro to do this, but can find no similar VB examples to get me started.
-with thanks
Mike Scott
 
Rather than write a macro, create a shape with as many extra arms as you need and use that.

To add extra arms to an Ethernet segment two sections must be modified. For each arm added, an extra row has to be added to the Controls section and a new Geometry Section added to the shapesheet.
1) Open the Ethernet segments shapesheet and insert a row for each new arm to the end of the Connections segment.
2) For each of the new rows set the ‘x’ value to ‘width*.5’ and the ‘y’ value to ‘height*.5’. These values will overlap the existing co-ordinates, but as each control handle is used, it exposes the control handle below it.
3) Set the ‘Y Dynamics’ and the ‘Tip’ to refer to the values in the first row in the Controls Section. ( ‘Controls.Ydyn’ and ‘Controls.Prompt’).
4) Add a Geometry Section for each new arm.
5) To each new Geometry section add a new row, by default the type will be ‘LineTo’.
6) Set it’s ‘x’ and ‘y’ value to ‘Controls.Xn’ and ‘Controls.Yn’. Where n represents the number of the associated Control Section. The ‘x’ value of the second row is set to point to the ‘x’ value of the first row. Set the ‘y’ value to ‘Height/2’. For the third row set the ‘x’ value to ‘Width/2’ and the ‘y’ value to the ‘y’ value of the second row’. John... Visio MVP
 
John,
Thanks for the reply. Yes, I did consider creating a super Ethernet shape manually, but I was concerned about performance. I have segments on my LAN approaching 48 nodes. If I have a LAN diagram with 20 of these 'super' Ethernet shapes, won't it drag down the performance while editing? Also, it would take a bit of time to manually create an additional 40 connectors.
My concept is that I could add connectors as required to specific Ethernet shapes with a single keystroke -nice!
Sure, there is some time involved with creating a macro, but think of the pride and satisfaction.....
Mike.
 
DVS - Developing Visio Solutions is a good reference for programming. It has a chapter on "Modifying a shape's sections and rows". It has an explanation of adding new sections and has a few examples. Up until Visio 2002, it came with Visio as a book or an Acrobat file on the distribution CD. With Visio 2002 it is available as a seperate book called "Developing Microsoft Visio Solutions". An online version is available through MSDN. John... Visio MVP
 
John,
DVS is a great resource! (Too bad Visio doesn't install this by default). I've just about got the job done -thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top