Message 1 of 6
issue pushing iproperties to other part
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've got a part W2400 that pushes iproperties to another part W2400_str by running the following ilogic code (that I found and adapted from these forums) with a "before save document" trigger.
The problem is I consistently get an error on 1st save and then if works on 2nd save (and when used in a larger assembly it disrupts the saving of the other unrelated parts on 1st save).
Any ideas on how to fix this or a better way to get the end result?
Dim str_part As String = ThisDoc.PathAndFileName(False) & "_str.ipt" new_desc = iProperties.Value("Project", "Description") new_part = iProperties.Value("Project", "Part Number") Dim oDoc As Inventor.Document = ThisApplication.Documents.Open(str_part, False) Dim oPropsets As PropertySets = oDoc.PropertySets Dim oProject As PropertySet = oPropsets.Item("{32853F0F-3444-11D1-9E93-0060B03C1CA6}") oProject("Description").Expression = new_desc oProject("Part Number").Expression = new_part oDoc.Save() oDoc.Close()