iLogicVB problem

iLogicVB problem

DWhiteley
Advisor Advisor
1,605 Views
5 Replies
Message 1 of 6

iLogicVB problem

DWhiteley
Advisor
Advisor

I'm using VB.NET

 

I am referencing AUTODESK.ILOGIC.INTERFACES.DLL

 

I have added this code:

 

Imports Autodesk.iLogic.Interfaces

 

Public iLogicVb As ILowLevelSupport

 

And getting this error:

 

Type 'ILowLevelSupport' is not defined.

 

What am I doing wrong?

 

Dave

0 Likes
Accepted solutions (1)
1,606 Views
5 Replies
Replies (5)
Message 2 of 6

MechMachineMan
Advisor
Advisor

If you are already using VB.net, why are you trying to get back into the iLogic Addin which accesses the API indirectly, instead of calling the function you want directly from Inventor/Excel API?


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 3 of 6

DWhiteley
Advisor
Advisor
Because I'm trying to run this:

iLogicVb.Automation.RulesOnEventsEnabled = false
0 Likes
Message 4 of 6

MechMachineMan
Advisor
Advisor

I think maybe using iLowLevelSupport is the wrong means to access it.

 

 

Property:Autodesk.iLogic.Interfaces.IiLogicAutomation.RulesEnabled
Description: Set this to False to disable rules running in response to parameter changes or other events. Set this to True to re-enable rule running.  This will also clear any rule errors that may have disabled rules from running.

 

See this thread and the attached file there for a breakdown of more of the accessible API features.

 

https://forums.autodesk.com/t5/inventor-customization/ilogic-api-documentation/td-p/6785772

 


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 5 of 6

DWhiteley
Advisor
Advisor

I'm nearly there!

 

 

Imports Autodesk.iLogic.Interfaces

 

Public Class Form1


Public oiLogic As IiLogicAutomation

 

oiLogic.RulesOnEventsEnabled = True

 

 

 

Get error - Type 'IiLogicAutomation' is not defined. As soon as I do a build.

 

 

I cannot use autodesk.ilogic.interfaces.LilogicAutomation.RulesEnabled=false (same sort of problem)

 

 

Dave

0 Likes
Message 6 of 6

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

Hi Dave,

 

Please find the following sample code to set RulesOnEventsEnabled to false

 

 

Dim addinGUID As String = "{3BDD8D79-2179-4B11-8A5A-257B1C0263AC}"

Dim addin As Inventor.ApplicationAddIn
addin = m_inventorApplication.ApplicationAddIns.ItemById(addinGUID) If addin IsNot Nothing Then
addin.Activate() Dim oilogic As Autodesk.iLogic.Automation.iLogicAutomation oilogic = addin.Automation oilogic.RulesOnEventsEnabled = False
End If

Please feel free to contact if there is any doubt.

 

If solves your problem, click on "Accept as solution" / give a "Kudo"

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network