Issue:
You have drawings that you want to update with a new border, title block, sketch symbol or other Drawing Resource item.
You have drawings that you want to update with a new border, title block, sketch symbol or other Drawing Resource item.
Solution:
Here is a quick iLogic rule to do this.
oBorderName = "My Border"
oTitleBlockName = "My Title Block"
oSymbolName = "My Symbol"
oResourceFile = "C:\Temp\MyDrawingResourceFile.idw"
'open source file
DimoSourceFileAsDrawingDocument
oSourceFile = ThisApplication.Documents.Open(oResourceFile, False)
DimoDocAsDrawingDocument
oDoc = ThisDoc.Document
'copy the resources from the source file, replace existing
oSourceFile.BorderDefinitions.Item(oBorderName).CopyTo(oDoc, True)
oSourceFile.TitleBlockDefinitions.Item(oTitleBlockName).CopyTo(oDoc, True)
oSourceFile.SketchedSymbolDefinitions.Item(oSymbolName).CopyTo(oDoc, True)
'close source file
oSourceFile.Close(True)