Quantcast
Channel: From the Trenches with Autodesk Inventor
Viewing all articles
Browse latest Browse all 61

iLogic Rule to Update Drawing Resources

$
0
0

 

iLogic Copy Drawing Resources Autodesk Inventor


Issue:
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)





Viewing all articles
Browse latest Browse all 61

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>