Autodesk Inventor
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
iLogic and VBExpress
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Just trying to learn iLogic.
I'm at a point where I'd like to create a dialog box to drive some parameters. I downloaded Visual Basic 2010 Express, and followed the directions given in IV's help file to "use a rule to display a dialog box", and also followed the steps described in "Get started with Visual Basic 2008", included in IV's help as well.
I build the dll file and saved where the help file told me to (Program Files\Autodesk\Inventor 2011\Bin\iLogicAdd\) *BTW, that iLogicAdd folder wasn't there, I created it*
I then went back to my IV file, and build the "Form Rule", again, per the help file. When trying to save this rule, I get this error message:
Error in rule: Form Rule, in document: Assembly1.iam
Could not load file or assembly 'file:///C:\Program Files\Autodesk\Inventor 2011\Bin\iLogicAdd\ClassLibrary1.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Seems pretty obvious that there's some conflict between IV and the 2010 version of Visual Basic Express. Is this the case, and if so, what can I do? Are there any files from IV that I can update that would let it work with 2010?
Thanks
Re: iLogic and VBExpress
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
OK, problem solved. Installed VB2008 Express and it works just fine.
A new question, though. In my test, I have a simple dialog box where I'm prompted for an input. This input drives a User Parameter that is used in another rule in an If...Then routine. The results of that routine change the color of a feature. It works, only that when the dialog box is OK'd, it doesn't update automatically, I have to click the "Regenerate All Rules" button.
How do I make the model/part/feature update as the change is made on the dialog box? For example, if you open the bracket iLogic sample, and play with the parameters, you can see that they change dinamically, real-time, even witht the parameters window still open.
Thanks
Mauricio
Re: iLogic and VBExpress
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
You need to set a trigger. See pic
-----------------------------------------------------------------------------------------
Ryan
Inventor Version:
Build: 535, Release: 2011 SSR - Date: Fri 08/20/2010
64-Bit Edition - 8192.00 GB
Dell Precision T3500
Intel(R) Xeon(R) CPU W3540 @ 2.93GHz (8 CPUs), ~2.9GHz
6.00 GB RAM
Windows Vista™ Ultimate (6.0, Build 6002) Service Pack 2
NVIDIA Quadro FX 1800 8.17.0012.5849
Re: iLogic and VBExpress
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
To answer your first question, Visual Basic 2010 Express will work with iLogic. You have to change a setting for each dialog dll that you build to make it compatible:
Under Properties (for the solution or project):
Compile -> Advanced Compile Options -> Target Framework
select
.NET Framework 3.5
About your second question, I don't think a trigger on Model Parameter Change will fix it. Instead, try setting an option for your dialog box rule: in the Rule Editor dialog, on the Options tab, check the Fire dependent rules immediately option. Another thing you could do is to add the line:
iLogicVb.UpdateWhenDone = True
to your other rule that changes the feature color.

Mike Deck
Software Developer
MFG-Digital Engineering
Autodesk, Inc.
Re: iLogic and VBExpress
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I think I'm well on my way. Thanks.
Now, when I place this part in a regular assembly, it shows me the parameters table, waiting for an input, not the dialog box that I want to see. The dialog box does show after I choose a value from the parameters table.
The bahavior is the same as with the Railing iLogic Sample Advanced: It has a nice dialog box that modifies several aspects of that assembly. However, that dialog box doesn't show when you open the assembly; instead, the parameters table is displayed first, just like in my test part. If you want to see the nice dialog box, you have to run its rule. Is this by design, or is it possible to set a switch somewhere that would make the dialog box appear as you insert the part or assembly?
Thanks again,
Mauricio
Re: iLogic and VBExpress
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
You're placing the part using the Place iLogic Component command, right?
By design, we bring up a standard parameters dialog instead of your custom form. In a future version, we should be able to support a custom form. This has been requested before: I'll increment the request count.

Mike Deck
Software Developer
MFG-Digital Engineering
Autodesk, Inc.
Re: iLogic and VBExpress
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Re: iLogic and VBExpress
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Yes, I'm using the Place iLogic Part button. Your answer helps me. I'll just stop with the dialog box. Don't really get why the developers would add this capability if it is crippled by not being able to use it from the beginning. Seems to me that's the more elegant way of doing this, not to mention it would make it way more intuitive for an end user when choosing options (rules) for a part. In my opinion, this shouldn't even be on a list of things to do that depends on how many requests are there for it...
Thanks for your help.
Mauricio
Re: iLogic and VBExpress
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
OK, here's my part. Still missing something.
Its a simple resistor. My goal is to be able to insert this part, display the parameters table so I can change the four bands as needed, and have the inserted resistor update its colors. I'd also like to name the file accordingly (i.e. if I choose a 480 ohm combination, then the file should be named 480XXX, or something similar)
My biggest issue right now is not having the part update instantly, but having to click on "regenerate all rules"
Thanks again for your guidance...
Mauricio
Re: iLogic and VBExpress
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
The problem is that statements like:
If Parameter("Band1") = 0 Then
are not enough to trigger the rule. The Parameter function won't trigger the rule. We're thinking of changing that in a future release, but to preserve backwards compatibility we might have to make it an optional behavior.
For now, the way to fix it is to use the parameter name directly in the rule:
If Band1 = 0 Then
The parameter name will show up in blue, indicating that it is a link to the model.
If you want to make your changes minimal, you can just add a line like:
trigger = Band1
to the top of each rule.

Mike Deck
Software Developer
MFG-Digital Engineering
Autodesk, Inc.



