J
john coon
I don't use excel very much but I'm looking for a method to export this type
of sheet so that I can use the content in a autocad script file.
cuurently I use a vba app I've written that collect the file names and
location and a start prefix for dwg no, (see below, results) this loops
thru the
file string and places the other coordinate data and commands in a batch
string. currenly I have 4 different routines that I must run to complete the
title block
information. what I am interested in learning is if those 4 routnes could be
generated from excel becuase all the strings reside in the excel document.
any direction you can provide is appreciated
John
this is the bulk of how I was generating the script file below
'sample sheet number G1.1
' Dim dwgprefix As String
' Dim dwgstart As Integer
' Dim dwgendnumber As Integer
' Dim dwgend As String
' Dim dot As String
' dwgprefix = TextBox1 'G
' dwgstart = TextBox2 '1
' dwgendnumber = TextBox3 ' 1
' dwgend = dwgprefix & dwgstart & "." & dwgendnumber
Private Sub CommandButton4_Click()
Dim intCTR As Integer
Dim strOptions As String
Me.Hide
Dim dwgprefix As String
Dim dwgstart As Integer
Dim dwgendnumber As Integer
Dim dwgend As String
Dim dot As String
dwgprefix = TextBox1
dwgstart = TextBox2
dwgendnumber = TextBox3
dwgend = dwgprefix & dwgstart & "." & dwgendnumber
'here is were it opens drawings from listbox2
For intCTR = 0 To ListBox2.ListCount - 1
Next intCTR
Dim DwgListCount As Integer
Dim i As Integer
Dim filenum As Integer
Dim strLine1 As String
Dim x As Integer
filenum = FreeFile
Open "c:\temp\changeATTS-DrawingNumber.scr" For Output As #filenum
Print #filenum, "cmddia"
Print #filenum, "0"
Print #filenum, "filedia"
Print #filenum, "0"
For i = 0 To ListBox2.ListCount - 1
ListBox2.Selected(i) = True
Print #filenum, "OPEN"
Print #filenum, ListBox2.List(i)
Print #filenum, "tilemode"
Print #filenum, "0"
Print #filenum, "-attedit"
Print #filenum, "y"
Print #filenum, "*"
Print #filenum, "drawno"
Print #filenum, "*"
Print #filenum, "w"
Print #filenum, "0.00,0.00,0.00"
Print #filenum, "34.00,22.00,0.00"
Print #filenum, "v"
Print #filenum, "r"
Print #filenum, dwgend
Print #filenum, "n"
Print #filenum, "QSAVE"
Print #filenum, "CLOSE"
dwgendnumber = dwgendnumber + 1
dwgend = dwgprefix & dwgstart & "." & dwgendnumber
Next i
Print #filenum, "cmddia"
Print #filenum, "1"
Print #filenum, "filedia"
Print #filenum, "1"
Close filenum
ListBox1.Clear
ListBox2.Clear
Label2.Caption = ""
MsgBox "Script File saved to c:\temp\changeATTS-DrawingNumber.scr.scr"
Me.Show
End Sub
DWG NO. SHEET DESCRIPTION SHEET NO. TOTAL
G1.1 TITLE SHEET 1 OF 19
G1.2 GENERAL NOTES, PROJECT LEGEND, AND DRAWING INDEX 2 OF 19
G1.3 GENERAL PLAN AND CONTRACTOR'S HAUL ROUTE 3 OF 19
G1.4 CONSTRUCTION PHASING PLAN 4 OF 19
G1.5 SAFETY PLAN 5 OF 19
G1.6 PAVEMENT DETAILS 6 OF 19
G1.7 EROSION CONTROL DETAILS 7 OF 19
C1.1 GEOMETRY & MARKING PLAN 8 OF 19
C1.2 APRON MARKING PLAN 9 OF 19
C1.3 MARKING, TAXIWAY EDGE REFLECTOR, & SIGN DETAILS 10 OF 19
CD1.1 DEMOLITION PLAN 11 OF 19
C2.1 PROFILE - TAXIWAY `C' 12 OF 19
C3.1 GRADING AND TEMP. EROSION CONTROL PLAN 13 OF 19
C3.2 PAVEMENT GRADING PLAN - TAXIWAY `C' - STA: 1+00 TO STA: 6+00 14
OF 19
C3.3 PAVEMENT GRADING PLAN - TAXIWAY `C' - STA: 6+00 TO STA: 6+00 15
OF 19
C4.1 DRAINAGE PLAN 16 OF 19
C4.2 DRAINAGE DETAILS 17 OF 19
X1.1 CROSS SECTIONS - TAXIWAY `C' - STA. 1+00 TO STA. 6+50 18 OF 19
X1.2 CROSS SECTIONS - TAXIWAY `C' - STA. 7+00 TO STA. 10+50 19 OF 19
'''''''''''''''''''''''''sample results
cmddia
0
filedia
0
OPEN
C:\55\test1.dwg
tilemode
0
-attedit
y
*
drawno
*
w
0.00,0.00,0.00
34.00,22.00,0.00
v
r
G1.1 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
n
QSAVE
CLOSE
OPEN
C:\55\test2.dwg
tilemode
0
-attedit
y
*
drawno
*
w
0.00,0.00,0.00
34.00,22.00,0.00
v
r
G1.2
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
n
QSAVE
CLOSE
of sheet so that I can use the content in a autocad script file.
cuurently I use a vba app I've written that collect the file names and
location and a start prefix for dwg no, (see below, results) this loops
thru the
file string and places the other coordinate data and commands in a batch
string. currenly I have 4 different routines that I must run to complete the
title block
information. what I am interested in learning is if those 4 routnes could be
generated from excel becuase all the strings reside in the excel document.
any direction you can provide is appreciated
John
this is the bulk of how I was generating the script file below
'sample sheet number G1.1
' Dim dwgprefix As String
' Dim dwgstart As Integer
' Dim dwgendnumber As Integer
' Dim dwgend As String
' Dim dot As String
' dwgprefix = TextBox1 'G
' dwgstart = TextBox2 '1
' dwgendnumber = TextBox3 ' 1
' dwgend = dwgprefix & dwgstart & "." & dwgendnumber
Private Sub CommandButton4_Click()
Dim intCTR As Integer
Dim strOptions As String
Me.Hide
Dim dwgprefix As String
Dim dwgstart As Integer
Dim dwgendnumber As Integer
Dim dwgend As String
Dim dot As String
dwgprefix = TextBox1
dwgstart = TextBox2
dwgendnumber = TextBox3
dwgend = dwgprefix & dwgstart & "." & dwgendnumber
'here is were it opens drawings from listbox2
For intCTR = 0 To ListBox2.ListCount - 1
Next intCTR
Dim DwgListCount As Integer
Dim i As Integer
Dim filenum As Integer
Dim strLine1 As String
Dim x As Integer
filenum = FreeFile
Open "c:\temp\changeATTS-DrawingNumber.scr" For Output As #filenum
Print #filenum, "cmddia"
Print #filenum, "0"
Print #filenum, "filedia"
Print #filenum, "0"
For i = 0 To ListBox2.ListCount - 1
ListBox2.Selected(i) = True
Print #filenum, "OPEN"
Print #filenum, ListBox2.List(i)
Print #filenum, "tilemode"
Print #filenum, "0"
Print #filenum, "-attedit"
Print #filenum, "y"
Print #filenum, "*"
Print #filenum, "drawno"
Print #filenum, "*"
Print #filenum, "w"
Print #filenum, "0.00,0.00,0.00"
Print #filenum, "34.00,22.00,0.00"
Print #filenum, "v"
Print #filenum, "r"
Print #filenum, dwgend
Print #filenum, "n"
Print #filenum, "QSAVE"
Print #filenum, "CLOSE"
dwgendnumber = dwgendnumber + 1
dwgend = dwgprefix & dwgstart & "." & dwgendnumber
Next i
Print #filenum, "cmddia"
Print #filenum, "1"
Print #filenum, "filedia"
Print #filenum, "1"
Close filenum
ListBox1.Clear
ListBox2.Clear
Label2.Caption = ""
MsgBox "Script File saved to c:\temp\changeATTS-DrawingNumber.scr.scr"
Me.Show
End Sub
DWG NO. SHEET DESCRIPTION SHEET NO. TOTAL
G1.1 TITLE SHEET 1 OF 19
G1.2 GENERAL NOTES, PROJECT LEGEND, AND DRAWING INDEX 2 OF 19
G1.3 GENERAL PLAN AND CONTRACTOR'S HAUL ROUTE 3 OF 19
G1.4 CONSTRUCTION PHASING PLAN 4 OF 19
G1.5 SAFETY PLAN 5 OF 19
G1.6 PAVEMENT DETAILS 6 OF 19
G1.7 EROSION CONTROL DETAILS 7 OF 19
C1.1 GEOMETRY & MARKING PLAN 8 OF 19
C1.2 APRON MARKING PLAN 9 OF 19
C1.3 MARKING, TAXIWAY EDGE REFLECTOR, & SIGN DETAILS 10 OF 19
CD1.1 DEMOLITION PLAN 11 OF 19
C2.1 PROFILE - TAXIWAY `C' 12 OF 19
C3.1 GRADING AND TEMP. EROSION CONTROL PLAN 13 OF 19
C3.2 PAVEMENT GRADING PLAN - TAXIWAY `C' - STA: 1+00 TO STA: 6+00 14
OF 19
C3.3 PAVEMENT GRADING PLAN - TAXIWAY `C' - STA: 6+00 TO STA: 6+00 15
OF 19
C4.1 DRAINAGE PLAN 16 OF 19
C4.2 DRAINAGE DETAILS 17 OF 19
X1.1 CROSS SECTIONS - TAXIWAY `C' - STA. 1+00 TO STA. 6+50 18 OF 19
X1.2 CROSS SECTIONS - TAXIWAY `C' - STA. 7+00 TO STA. 10+50 19 OF 19
'''''''''''''''''''''''''sample results
cmddia
0
filedia
0
OPEN
C:\55\test1.dwg
tilemode
0
-attedit
y
*
drawno
*
w
0.00,0.00,0.00
34.00,22.00,0.00
v
r
G1.1 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
n
QSAVE
CLOSE
OPEN
C:\55\test2.dwg
tilemode
0
-attedit
y
*
drawno
*
w
0.00,0.00,0.00
34.00,22.00,0.00
v
r
G1.2
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
n
QSAVE
CLOSE