Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, can anyone help?
This code copies all iProperties. I only need to copy some iProperties, not all iProperties.
I only need to copy iProperties named and Value. "test1" and "test2"
Sub Main() Dim oFileName As String = "C:\iLogic_Main\a.ipt" Dim mojecesta As String = "C:\iLogic_Main\b.iam" ' mojecesta = ThisDoc.PathAndFileName(True) Dim copyFrom As Document = ThisApplication.Documents.Open(oFileName, False) 'Document to copy from Dim copyTo As Document = ThisApplication.Documents.Open(mojecesta, False) 'Document to copy to CopyEventsPropSet(copyFrom, copyTo) End Sub Sub CopyEventsPropSet(CopyFrom As Document, CopyTo As Document) Dim refiProps As PropertySet = CopyFrom.PropertySets.Item("Inventor User Defined Properties") Dim deriPorps As PropertySet = CopyTo.PropertySets.Item("Inventor User Defined Properties") Dim oProp As Inventor.Property For Each oProp In refiProps Dim oProp1 As Inventor.Property Dim oProp2 As Inventor.Property Try deriPorps.Add(oProp.Value, oProp.Name) Catch ex As Exception End Try Next CopyFrom.Close(True) End Sub
I tried it and I don't get it at all.
The attachment is in version 2022
Solved! Go to Solution.