Message 1 of 4

Not applicable
04-05-2016
10:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The following code fails with "Error in rule: Change By Selection, in document: test.iam Public member 'Document' on type 'ComponentOccurrenceProxy' not found." Any help wold be appreciated. It appears i need to get the document object from the ComponentOccuranceProxy but I'm Not sure how... I am using kAllEntitiesFilter because it allows me to "reach into" subassemblies in th browser while making the selection.
SyntaxEditor Code Snippet
'select end1 sel_flag=0 Dim end1 = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAllEntitiesFilter,"Select End 1:") If (Not end1 Is Nothing) Then sel_flag=1 End If If(sel_flag=1) MessageBox.Show(end1.Name, "End1") Dim docEnd1 as document docEnd1 = end1.Document customPropertySet = docEnd1.PropertySets.Item("Inventor User Defined Properties") customPropertySet.item("Connected To").Value = end1.Name End If
Solved! Go to Solution.