Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
A.Acheson
in reply to: mgeeW7SQV

Here is the copy for loop for the sheet format

 

For Each oShtFormat as SheetFormat in oSourceDoc.SheetFormats
	oShtFormat.CopyTo( oTargetDoc)
Next

 To 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