Community
Solved! Go to Solution.
Solved by ekinsb. Go to Solution.
You can use the CopyTo method to copy a sketch block definition from one document to another. Below is a very basic example that illustrates it.
Public Sub CopyBlocks() ' Somehow get a reference to the document you want to copy from and the ' one you're copying to. Dim sourceDoc As PartDocument Dim targetDoc As PartDocument Set sourceDoc = ThisApplication.Documents.Item(4) Set targetDoc = ThisApplication.Documents.Item(5) ' Get the sketch block definition you want to copy. Dim sourceBlockDef As SketchBlockDefinition Set sourceBlockDef = sourceDoc.ComponentDefinition.SketchBlockDefinitions.Item(1) ' Copy the sketch block definition into the other document. Call sourceBlockDef.CopyTo(targetDoc) End Sub