Multiple drawing sheets don't rebuild automatically!

Is there a way to make mulitple drawing sheets rebuild automatically when
loading or saving?
I have an 8 sheet drawing and have to rebuild each sheet individually before
I can print without getting the cross-hatched views.
Reply to
Pete
Loading thread data ...
"Pete" wrote in news:409baca1$0$3020$ snipped-for-privacy@news.rcn.com:
It's pretty sad that SW doesn't know when a sheet is ready to print, isn't it? There are some settings that reduce the incidence of hatched views, but there are other issues that crop up with plotting.
Here's a macro that is actually a little more thorough than going to each sheet and doing a ctrl-q. I've found it's the only way to make sure every sheet is ready for printing. This macro obviously has some ugly history, and could be cleaned up, but it works.
'traverses all views on all sheets, updating out of date views 'CHANGED TO FORCE UPDATE ALL VIEWS
Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2
Sub main()
Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc If swModel.GetType 3 Then swApp.SendMsgToUser "Run this on a .SLDDRW file, you silly person!" Exit Sub End If
Dim SheetNames As Variant Dim SheetCount As Integer Dim i As Integer Dim j As Integer Dim ActiveView As Object 'get all sheet names SheetNames = swModel.GetSheetNames 'get total number of sheets SheetCount = swModel.GetSheetCount For i = 0 To SheetCount - 1 ' active first sheet retval = swModel.ActivateSheet(SheetNames(i)) swModel.GraphicsRedraw2 'loop through all views ' Set ActiveView = swModel.GetFirstView ' Do While Not ActiveView Is Nothing ' Debug.Print ActiveView.IsModelOutOfDate ' If ActiveView.IsModelOutOfDate = True Then retval = swModel.ForceRebuild3(False) 'Rebuild(0) ' End If ' Set ActiveView = ActiveView.GetNextView ' Loop Debug.Print (i + 1) Next swApp.SendMsgToUser "View updates complete." ' 'Get the current sheet name ' CurrentSheetName = CurrentSheet.GetName Set ActiveView = Nothing Set ActiveNote = Nothing End Sub
Reply to
Dale Dunn
Thanks for posting the macro. A few questions.
1. Is SW planning on fixing this problem, or should I roll back to SP2 since it seems they broke this in SP3?
2. I've never loaded a macro, what do I do with the code you posted?
Thanks.
pope
Reply to
pope
Go to Tools, macro, new, I think, to create a new macro. Paste the text into the new macro file, replacing what is there by default. Once you have it saved, you can play the macro from the macro toolbar or from the same area in the menu where you created the new macro.
Spend some time learnig to use macros, and search the web for SW macros. There are a lot of nive little time-savers out there.
Reply to
Dale Dunn

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.