Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Print Every Section Designer Section

Status
Not open for further replies.

dreber

Civil/Environmental
Feb 9, 2011
105
I am working with dozens of concrete sections that I have input into the SAP section designer. Does anyone have a good way of printing them all at once?
 
Replies continue below

Recommended for you

I eventually solved this, but the solution ended up being a bit convoluted.

I installed AutoHotKey and used it to produce the following script:

Then I created a text file "Sections.txt" and entered my section names into it, one per line.

Running the script will loop through each section and print it to PDF.

Getting this to work takes a bit of time depending on your coding abilities, but if you have to print hundreds of sections as I have had to, it is worthwhile. It also makes you look cool at work :)

Code:
Section = 1A02

ArrayCount = 0

Loop, Read, C:\Documents and Settings\User\Desktop\DELETEME\AutoHotKey\Sections.txt
{
Section := A_LoopReadLine 

WinWait, SAP2000 v16.1.0 Advanced  - 14029 Foster East - Working, 
IfWinNotActive, SAP2000 v16.1.0 Advanced  - 14029 Foster East - Working, , WinActivate, SAP2000 v16.1.0 Advanced  - 14029 Foster East - Working, 
WinWaitActive, SAP2000 v16.1.0 Advanced  - 14029 Foster East - Working, 
MouseClick, left,  121,  17
Sleep, 100
Send, {ALTDOWN}d{ALTUP}pf
WinWait, Frame Properties, 
IfWinNotActive, Frame Properties, , WinActivate, Frame Properties, 
WinWaitActive, Frame Properties, 
Send, {TAB}{TAB}{END}{BACKSPACE}{BACKSPACE}{BACKSPACE}{BACKSPACE}{BACKSPACE}{BACKSPACE}a{BACKSPACE}%Section%{TAB}{TAB}{TAB}{TAB}{ENTER}
WinWait, SD Section Data, 
IfWinNotActive, SD Section Data, , WinActivate, SD Section Data, 
WinWaitActive, SD Section Data, 
Send, {TAB}{TAB}{TAB}{ENTER}
WinWait, SAP2000 - %Section%, 
IfWinNotActive, SAP2000 - %Section%, , WinActivate, SAP2000 - %Section%, 
WinWaitActive, SAP2000 - %Section%, 
Send, {ALTDOWN}f{ALTUP}p
WinWait, Save PDF File As, 
IfWinNotActive, Save PDF File As, , WinActivate, Save PDF File As, 
WinWaitActive, Save PDF File As, 
Send, %Section%{ENTER}y
WinWait, %Section%.pdf - Adobe Acrobat Standard, 
IfWinNotActive, %Section%.pdf - Adobe Acrobat Standard, , WinActivate, %Section%.pdf - Adobe Acrobat Standard, 
WinWaitActive, %Section%.pdf - Adobe Acrobat Standard, 
Send, {ALTDOWN}{F4}{ALTUP}
WinWait, SAP2000 - %Section%, 
IfWinNotActive, SAP2000 - %Section%, , WinActivate, SAP2000 - %Section%, 
WinWaitActive, SAP2000 - %Section%, 
Send, {ALTDOWN}{F4}{ALTUP}
WinWait, SD Section Data, 
IfWinNotActive, SD Section Data, , WinActivate, SD Section Data, 
WinWaitActive, SD Section Data, 
Send, {ESC}
WinWait, Frame Properties, 
IfWinNotActive, Frame Properties, , WinActivate, Frame Properties, 
WinWaitActive, Frame Properties, 
Send, {ESC}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor