iLogic Error on check in

iLogic Error on check in

Cosmin_V
Advocate Advocate
262 Views
2 Replies
Message 1 of 3

iLogic Error on check in

Cosmin_V
Advocate
Advocate

Hello,

 

I have an Assembly with a short iLogic rule which is add and delete some components.

After 2022 update I have this error (whit inventor 2021 was working perfect) when I want to check it in Vault.

The rule it works ok...(add the component/delete component), save,but when check in...ERROR

 

 

vaida_cosmin_0-1649142299136.png

 

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.ComponentOccurrence.set_Transformation(Matrix )
at Autodesk.iLogic.Core.ForRuleCode.ManagedComponents.ConditionallyApplyTransformation(ComponentOccurrence occurrence, Matrix matrix)
at Autodesk.iLogic.Core.ForRuleCode.ManagedComponents._Add(String occName, String file, String modelStateName, String familyName, String designation, Object[] findRow, ComponentAspects compAspects)
at Autodesk.iLogic.Core.ForRuleCode.ManagedComponents.Add(String occName, String file, PointOrMatrix position, Nullable`1 grounded, Nullable`1 visible, StringOrAsset appearance)
at ThisRule.Main() in rule: Rule4, in document 00299234.iam:line 36
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)

 

on the line 36 it is this line....

If Single_Tower = "Include" Then
		Dim Tower1 = Components.Add("00321077:1", "00321077.iam", position := Nothing, grounded := False, visible := True, appearance := Nothing)
	Constraints.AddFlush("Flush:24", "00321077:1", "XZ Plane", "", "XY Plane", -23 mm)
    Constraints.AddFlush("Flush:25", "00321077:1", "YZ Plane", "", "XZ Plane")
    Constraints.AddFlush("Flush:26", "00321077:1", "XY Plane", "", "YZ Plane", (Tray_Width/2) + 73.05)
       	Dim Tower2 = Components.Add("00321077:2", "00321077.iam", position := Nothing, grounded := False, visible := True, appearance := Nothing)
		Constraints.AddFlush("Flush:27", "00321077:2", "XZ Plane", "", "XY Plane", -23 mm)
		Constraints.AddMate("Mate:50", "00321077:2", "YZ Plane", "", "XZ Plane")
		Constraints.AddMate("Mate:51", "00321077:2", "XY Plane", "", "YZ Plane", (Tray_Width/2) + 73.05)

 

0 Likes
263 Views
2 Replies
Replies (2)
Message 2 of 3

Ralf_Krieg
Advisor
Advisor

Hello

 

The error message suggests there's something wrong with the optional positioning matrix on component add. Could you try to use command without setting optional values to nothing?

Dim Tower1 = Components.Add("00321077:1", "00321077.iam",, grounded := False, visible := True)

 


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
Message 3 of 3

Cosmin_V
Advocate
Advocate

thanks @Ralf_Krieg 

 

Nothing....it is same

0 Likes