Hi, all,
I use iLogic occasionally. I am confused of these two namespaces in iLogic: iLogicVB and InventorVB. There are:
InventorVb.DocumentUpdate()
iLogicVb.UpdateWhenDone = True
Are they the same? what is the difference?
There are: iLogicVb.RunRule("ruleName"). Why not: InventorVb.RunRule("ruleName")?
So help me to find out the functional boundaries between InventorVB and iLogicVB.
Solved! Go to Solution.
Solved by MjDeck. Go to Solution.
As far as I've ever heard, they are both basically the same thing. They are both predefined objects that implement/represent the same ILowLevelSupport Interface of the iLogic add-in. Here are a couple of links on the subject.
If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.
If you want and have time, I would appreciate your Vote(s) for My IDEAS :light_bulb: or you can Explore My CONTRIBUTIONS
Wesley Crihfield
(Not an Autodesk Employee)
I don't really believe InventorVB and iLogicVB have the same functional domain. Still not understand what differentiate them. why
Since those two objects are defined by Autodesk 'behind the scenes' within their iLogic Add-In/API, you would most likely have to consult an Autodesk software developer who works with the iLogic system directly, because there doesn't appear to be any publicly available documentation about them. I'm thinking that if anyone would know the proper answer to this question, it might be @MjDeck (Mike Deck at Autodesk).
Wesley Crihfield
(Not an Autodesk Employee)
iLogicVb and InventorVb are two references to the same object. The following rule demonstrates this. It uses the Visual Basic Is operator.
If iLogicVb Is InventorVb Then
MessageBox.Show("iLogicVb and InventorVb refer to the same object.", "iLogic")
Else
MessageBox.Show("iLogicVb and InventorVb refer to the different objects.", "iLogic")
End If
This is documented under ILowLevelSupport.
It was not a very good design decision. For clarity, it would be better to have two separate objects instead of one catch-all. The reason for two separate names : some of the properties and methods deal more or less directly with Inventor, and some of them are iLogic-specific.
For instance, InventorVb.DocumentUpdate() updates the document in which the rule is running right away. But
iLogicVb.UpdateWhenDone = True
tells iLogic to update the document *after* it has finished running the rule. That's an iLogic-specific function.
Similarly, iLogicVb.RunRule("ruleName") runs a rule. InventorVb.RunRule("ruleName") could be used and it would do the same thing. But rules are iLogic-specific, so the snippets and examples use iLogicVb for this.
Great! It means the words of iLogicVB and InventorVB are interchangeable when in iLogic coding environment. For my practice, I would prefer using iLogicVB across board to deal any coding relative to iLogic.
Thanks to both of you!
I don't like to necro old threads, but I feel the differences between iLogicVb, inventorVb and even iLogicVb.Automation really need better clarification, a good example below;
iLogicVb.RunRule only works for running rules in assembly components via the browser name (which goes against the snippet wording of compOrdocname) whereas iLogicVb.Automation.RunRule works for running rules via docname. This doesn't appear to be documented anywhere that I can find.
Hi Charles,
iLogicVb and InventorVb are the same.
However, iLogicVb and iLogicVb.Automation are not the same.
Generally, functions that you call directly on iLogicVb do not have a Document object as an argument. They use strings (component or document names) instead.
Here's the documentation for iLogicVb.RunRule.
Functions on iLogicVb.Automation will generally take a Document object. These are meant to be more general. They can be called from an add-in or external EXE, as well as from an iLogic rule.
Here's the documentation for iLogicVb.Automation.RunRule. It doesn't accept any type of string to specify the Document. You need a Document object.
Can't find what you're looking for? Ask the community or share your knowledge.