Trouble configuring subassembly with a rule

Trouble configuring subassembly with a rule

sporqster
Explorer Explorer
328 Views
1 Reply
Message 1 of 2

Trouble configuring subassembly with a rule

sporqster
Explorer
Explorer

I have a top level assembly with a lot of parameters that I want to feed to various subassemblies, which should, ideally, configure themselves using their own rules. In this case I have a user parameter called 'LINER_PACKAGE' that I want to pass text to various subassemblies which will do what they respectively need to do with that text parameter input from the upper level assembly. I have a form the user will use to select a liner package from a drop-down. The following code then passes the liner info to the subassembly.

 

SyntaxEditor Code Snippet

If LINER_PACKAGE <> "" Then
Parameter("MODEL-BN:1","LINER_PACKAGE")=LINER_PACKAGE
End If

 

That part appears to work. The user property 'LINER_PACKAGE' in the subassembly MODEL-BN is populated with the same text as appears in the upper level assembly.

 

But I want the subassembly MODEL-BN to then do something with that info, namely suppress the parts not related to that liner package, and unsuppress the parts that are. Here's a bit of code from a rule in the subassembly:

 

SyntaxEditor Code Snippet

If LINER_PACKAGE = "10 GA. GALV." Then
Component.IsActive("R2115271:1") = True
Else If LINER_PACKAGE <> "10 GA. GALV."
Component.IsActive("R2115271:1") = False
End If

 

And that works when testing the sub-assembly alone changing the parameter value manually.

 

BUT, when I change the parameter using the upper level assembly's rule I get this message:

 

Error in rule: PUSH_DATA_TO_CHILDREN, in document: CEBE_Skeleton.iam

Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))

 

MORE INFO TAB reveals:

System.Runtime.InteropServices.COMException (0x80004005): Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at Inventor.Parameter.set_Value(Object )
at iLogic.ParamDynamicFinder.SetParamValue(Parameter param, Object value, Boolean doUpdate)
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)

 

And it appears as though the rule in the subassembly never fired.

Help please? Ive been spinning my wheels most of the day on this one. 

 

 

0 Likes
329 Views
1 Reply
Reply (1)
Message 2 of 2

tginder
Community Visitor
Community Visitor

For what it's worth, this seems to be resolved now.

0 Likes