iLogic run much longer in windows 10, and multiple excel instances

iLogic run much longer in windows 10, and multiple excel instances

liminma8458
Collaborator Collaborator
3,076 Views
25 Replies
Message 1 of 26

iLogic run much longer in windows 10, and multiple excel instances

liminma8458
Collaborator
Collaborator

We are planing to move our Inventor 2019 into Windows 10 from Windows 7. But something in iLogic is dragging our feet.

 

We use iLogic extensively to control sizes of parts. The iLogic rules read size data from Excel spreadsheet. This process runs very fast in Windows 7,  as shown in the first sample video in about just 1 second. But in Windows 10, it takes 18 second to run the same model, as in the second sample video. We have many similar assembly models to run with iLogic in an automation program, this running time in windows 10 is unacceptable.

 

I notice in the running under windows 7, Task Manager shows no Excel instance; while in windows 10, task manager shows sequential and multiple Excel instances when iLogic runs through each sub components. Is it the reason that the time drains in windows 10? Is there any way or switch to turn off those multiple excel instance as in that machine with windows 7? [I try many ways to find but still don't know why this windows 7 laptop runs so fast without showing excel instance in task manager, it is a regular HP Zbook 15 G2 laptop (i7 4810 cpu, 2.8G Hz,  16G ram, 2G graphics) ]

 

iLogic_run_in_win7_sample1:

https://knowledge.autodesk.com/community/screencast/69552e85-e822-4b49-b80d-8e8d3978dcc9

 

iLogic_run_in_win10:

https://knowledge.autodesk.com/community/screencast/d9fad826-f400-4b5d-9920-be8eb17dcb89

 

Attached are the assembly of this model whose sub-components with iLogic rules. The code for the button is in the Word file. It utilizes the iLogic command of "Regenerate All Rule", and just add a timer to demo how long to run all the rules. You can also simply use iLogic "Regenerate All Rule" command to test how long your machine takes and whether it invokes multiple excel instances in task manager. Please test it and Let me know what you experience. And I am looking for the solution of long running time of iLogic in Windows 10 and what is the setup not to show the multiple excel instances in task manager.

 

Thank you very much!

Thanks
Limin
Inventor pro 2023 64 bit update 5.3; Windows 11 pro 64 bit version 24H2; Office 2013 64 bit

Download iCable in App Store to Create Cables Easily

0 Likes
Accepted solutions (1)
3,077 Views
25 Replies
Replies (25)
Message 21 of 26

MjDeck
Autodesk
Autodesk

It might be possible to use GoExcel from VB.NET in current releases, but Autodesk doesn't provide support for it.
We do have a plan to provide this in future. It won't be in the 2020 release, but possibly in 2021.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 22 of 26

liminma8458
Collaborator
Collaborator

Hi, Mike,

"It might be possible to use GoExcel from VB.NET in current releases". Do you mean there is a workaround to call GoExcel in VB.NET for Inventor 2019 addin (if yes, do you have some example?), or still there is no way to do it yet?

I already use something like: RunAllRulesInDocument(refDoc, iLogicAuto) in VB.NET.

Thanks

 

Thanks
Limin
Inventor pro 2023 64 bit update 5.3; Windows 11 pro 64 bit version 24H2; Office 2013 64 bit

Download iCable in App Store to Create Cables Easily

0 Likes
Message 23 of 26

MjDeck
Autodesk
Autodesk

I looked at this in more detail, and it's not possible to call GoExcel directly from VB.NET in Inventor 2019.
But you can do it indirectly by running a rule. With RunRuleWithArguments or RunExternalRuleWithArguments you can pass arguments to the rule and have it return a value or a collection of values. This requires more work than if you were able to call the functions directly, but it provides the same functionality.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 24 of 26

liminma8458
Collaborator
Collaborator

Hi, Mike,

 

There is two follow-up questions:

 

1.  We are using VB.NET to read data from Excel in our addin, is it possible VB.NET code is able to leverage the power of LibXL, so when VB.NET code read data from Excel spreadsheet, it has no need to launch Excel.exe first?

 

2. You mentioned it's possible to call GoExcel directly from VB.NET in Inventor 2021, it becomes true or not?

Thanks
Limin
Inventor pro 2023 64 bit update 5.3; Windows 11 pro 64 bit version 24H2; Office 2013 64 bit

Download iCable in App Store to Create Cables Easily

0 Likes
Message 25 of 26

MjDeck
Autodesk
Autodesk

@liminma8458 , yes in Inventor 2021 you can access GoExcel from an addin. And GoExcel can use LibXL as its engine.

To do this,  add a reference to Autodesk.iLogic.Interfaces.dll in your project. Then code like this will work:

Public Class LibXLTest
    Public Shared Sub Test(app As Application, doc As Document)
        Using iLogicFactory = StandardObjectFactory.Create(doc)
            Dim goExcel = iLogicFactory.GoExcel

            Try
                Dim a1 = goExcel.CellValue("Test1.xlsx", "Sheet1", "A1")
                Debug.Print(" --- Cell A1 = {0}", a1)
            Catch ex As Exception
                Debug.Print(" exception: {0}", ex)
            End Try
        End Using
    End Sub
End Class

This code doesn't specifically select LibXL as the engine. It uses whatever the current setting is. But it is also possible to select LibXL from code.
Note: GoExcel doesn't provide all the functionality of the Excel COM API. If you need more, you might consider using LibXL directly. It has its own API.


Mike Deck
Software Developer
Autodesk, Inc.

Message 26 of 26

liminma8458
Collaborator
Collaborator

Mike,

This is a great news. I will try it. Thank you so much!

Thanks
Limin
Inventor pro 2023 64 bit update 5.3; Windows 11 pro 64 bit version 24H2; Office 2013 64 bit

Download iCable in App Store to Create Cables Easily

0 Likes