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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spiral stencil Visio 2003

Status
Not open for further replies.

nikhilkumar

IS-IT--Management
Mar 18, 2003
3
US
I need to create a spiral figure and was looking for a spiral stencil for Visio 2003
 
You can generate your own spiral simply (and with good control) from VBA by using the DrawSpline command, and make your own template from there:
Code:
Private Sub CommandButton1_Click()
  Dim mySpiral As Visio.Shape
  Dim I As Integer
  Dim xypts(1 To 500 * 2) As Double
     For I = 1 To 500
          'Set x components
          xypts(I * 2 - 1) = 4 + (I / 300 * Cos(I / 20))
          'Set y components
          xypts(I * 2) = 3 + (I / 300 * Sin(I / 20))
     Next I
  Set mySpiral = ActivePage.DrawSpline(xypts, 0, visSplineAbrupt)
End Sub
You can change the shape of the original spiral by adjusting the constants as required

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
John,

Thanks for the help so far!

Can this be defined as a Visio shape, so that I can drag and drop it or create specific properties? How do I integrate it?

Regards,
Nikhil

 
It is a single Visio shape already. Just open a stencil file and drag the shape to the stencil window. You will get a dialog box to confirm that you want to edit the stencil. When you accept, the shape is then stored in the stencil. From there it will act like any other stencil object.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top