Message 1 of 2
Controlling positional rep of IAM within subassembly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm using the following code to change a positional rep of an IAM within my model, based on the LoadDia variable:
Dim oOcc As ComponentOccurrences = ThisApplication.ActiveDocument.ComponentDefinition.Occurrences Dim oPos As ComponentOccurrence
oPos = oOcc.ItemByName("1166964:2")
oPos.ActivePositionalRepresentation = LoadDia
It's working great. However, now, I want to change the positional rep of a Subassy within another IAM (as if the original IAM had been demoted). I would think my third line simply changes to reflect the new, demoted relationship:
oPos = oOcc.ItemByName("MA Auto FRAME SUB:1", "1166964:1")
No such luck. Various attempts give me errors like:
Too many arguments to 'Public ReadOnly Property ItemByName(Name As String) As Inventor.ComponentOccurrence'.
or Cannot convert to String
Please let me know if this can be done. Thanks!
Inventor Professional 2021
Vault Professional 2021
Vault Professional 2021