Message 1 of 1
Link value from Assembly to subassembly and subassembly's part
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am trying to send value of parameter from assembly to it's subassembly and subassembly's part. Both subassembly and subassembly's part consists of model states.
For example,
Assembly.iam
--> Subassembly1.iam (Model State 1)
--> Part1 (Model State 1)
--> Subassembly1.iam (Model State 2)
--> Part1 (Model State 2)
Below is what I do.
Sub Main() Dim oAsmDoc As AssemblyDocument = ThisApplication.ActiveDocument Dim oOcc As ComponentOccurrence Dim ofacDoc As Document oOcc = oAsmDoc.ComponentDefinition.Occurrences.ItemByName("PIPE 1") ofacDoc = oOcc.Definition.FactoryDocument ofacDoc.ComponentDefinition.ModelStates.Item("SC-SF-PIPE-01").Activate() ofacDoc.ComponentDefinition.Parameters.ModelParameters.Item("Pipe_OD").Units = UnitsTypeEnum.kCentimeterLengthUnits ofacDoc.ComponentDefinition.Parameters.ModelParameters.Item("Pipe_OD").Value = PipeOD(Pipe_DN)
End Sub
The above code, I can send the parameter value to subassembly model state. If i do the same at subassembly, assuming that assembly value is sent to subassembly, then running event trigger, I thought it will run the rule and send the similar parameter from subassembly (Model State) to subassembly's part (Model State).
It is not working this way.
Is there any code I can use?