This is little VBA code to create a helix and I am hoping that someone out there has more skill than me can help get this to work. Thanks Bruce b*** snipped-for-privacy@sprint.ca remove the *'s to contact directly by email but I would rather see any response posted to this group
Option Explicit Public Sub calc1() Dim points(200) As Integer ' ReDim points(1 To 10) As Integer Dim x, y, z, h, t As Integer Dim counter t = 5 h = 24 For z = 1 To 36 Select Case t Case t
I do VB to create DXF files so they can be loaded into either full ACAD or LT. I think the following code gives a passable helix based on straight lines in
3D space. You may find it helpful.
Regards
The form has three inputs "number of rotations", "radius" and "pitch" and two buttons "Create helix" and "EXIT"
Private Sub Command1_Click() End End Sub
Private Sub Command2_Click() Nr = Val(Text1.Text) 'number of rotations Rad = Val(Text2.Text) 'radius of helix Pt = Val(Text3.Text) 'pitch of helix 'use 5 deg increments Inc = 360 / 5 'number if increments in a pitch Zi = Pt / Inc 'position in Z axis Itot = Nr * Inc ' total number of increments X1 = Rad 'initial x Y1 = 0 'initial y Z1 = 0 'initial z I = 1
dxfTempFile = "C:\tempHelix.dxf" 'dxfTempFile = GetTempFileName FileNo = FreeFile newCreateDXF.FileNo = FileNo 'passes FileNo to DXF module Open dxfTempFile For Output As #FileNo 'Open dxfTempFile For Output As #1
PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.