08-31-2022
08:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-31-2022
08:10 PM
Here is the copy for loop for the sheet format
For Each oShtFormat as SheetFormat in oSourceDoc.SheetFormats
oShtFormat.CopyTo( oTargetDoc)
NextTo delete target Drawing resources not in use. *Note: Only run this at the end when you want to purge any unused items. Any resources contained in the sheet will remain untouched.
oTBdefs = oTargetDoc.TitleBlockDefinitions
oBorderDefs = oTargetDoc.BorderDefinitions
oSymbols = oTargetDoc.SketchedSymbolDefinitions
For Each oTBdef In oTBdefs
Try
oTBdef.Delete
Catch
MsgBox("Unknown error in copy title block for " & Chr(34) & oTBdef.Name & Chr(34),vbOKOnly,"Error")
End Try
Next
For Each oBorderDef In oBorderDefs
Try
oBorderDef.Delete
Catch
MsgBox("Unknown error in copy border definition for " & Chr(34) & oBorderDef.Name & Chr(34),vbOKOnly,"Error")
End Try
Next
For Each oSymbol In oSymbols
Try
oSymbol.Delete
Catch
MsgBox("Unknown error in copy sketched symbol for " & Chr(34) & oSymbol.Name & Chr(34),vbOKOnly,"Error")
End Try
Next
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan
Or if this helped you, please, click (like)
Regards
Alan