- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am running into an issue with a piece of iLogic code (external rule) I wrote to automate the creation of assemblies and drawings, where the leader notes that I had previously been able to place are now no longer placing and throwing an error message as follows:
Error on line 1389 in rule: Mongoose Configurator Code, in document: WO-S-11546 DIXON STOCK 184-HD.iam
No such interface supported
More info tab as follows:
System.ArgumentException: No such interface supported
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Object[] aArgs, Boolean[] aArgsIsByRef, Int32[] aArgsWrapperTypes, Type[] aArgsTypes, Type retType)
at Inventor.LeaderNotes.Add(ObjectCollection LeaderPoints, String FormattedText, Object DimensionStyle)
at ThisRule.Main() in external rule: Mongoose Configurator Code:line 1389
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at Autodesk.iLogic.Exec.AppDomExec.ExecCodeHere()
at Autodesk.iLogic.Exec.AppDomExec.ExecCodeInOtherDomain(AppDomain otherDomain, String assemName)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
This code starts from running an an assembly document, places various parts according to a spec number from user input, and then will save the assembly, create a drawing document with 2 named sheets, place views, places rev tables, text blocks, and leader notes, places text blocks, dimensions on second sheet, saves drawing, prints each page to separate pdf, and checks in.
This code worked without issue before updating to inventor 2025. Post update it will create the assembly, save, create new drawing document, creates second sheet, names both sheets, place borders, title blocks, rev tables, first text block on sheet 1, and views on both sheets. It then throws the above error when it attempts to use the following snippet to add the first leader note to the drawing: error on line 20 from below.
I have included the full iLogic file for reference.
Dim invApp As Inventor.Application
Dim DrawDoc As DrawingDocument
Dim Production, Sales As Sheet
Dim frmOcc As ComponentOccurrence
Dim frmAsmComp As AssemblyComponentDefinition
Dim frmWP As WorkPoint
Dim frmCO As String
Dim frmWPProxy As WorkPointProxy
Dim frmMK As Centermark
Dim frmPT As ObjectCollection
Dim frmNote As LeaderNote
frmWP = frmAsmComp.WorkPoints.Item("FRM")
frmWPProxy = Nothing
frmOcc.CreateGeometryProxy(frmWP, frmWPProxy)
frmMK = Production.Centermarks.AddByWorkFeature(frmWPProxy, Right)
frmPT = invApp.TransientObjects.CreateObjectCollection
frmPT.Add(invApp.TransientGeometry.CreatePoint2d(frmMK.Position.X - 0.75, frmMK.Position.Y - 1.25))
frmPT.Add(Production.CreateGeometryIntent(frmMK))
frmNote = Production.DrawingNotes.LeaderNotes.Add(frmPT, frmCO)
Solved! Go to Solution.