When I have a sheetmetal part with an iLogic rule in it and I delete a feature, Inventor sticks this garbage into my rule.
Thoughts?
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
Hi mrattray,
I think that anytime a parameter is used in the iLogic code, and then that parameter is deleted, it will add that at the beginning of the rule in order to define the variable so that the code doesn't blow up.
So for instance if I had an empty part with a user parameter named MyParam, with a value of 10mm, and a rule that included only one line:
MessageBox.Show(MyParam, "iLogic")
And then I deleted the parameter, then the rule would automatically be modified to read:
MyParam = 10 ' deleted parameter
MessageBox.Show(MyParam, "iLogic")
So that the message box wouldn't error out.
It might help to run through those steps to recreate this in case I've been unclear. This really threw me the first time I encountered it also.
In your case defining Thickness as a User Parameter so that it doesn't get removed when the feature is deleted, might provide a solution.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Thanks for the response Curtis. This is correct, and makes at least some sense in the context of your example. However in this case the parameter that it thinks is deleted is the sheet metal parameter Thickness, which definitely wasn't deleted. This causes my code to blow up when it would have been just fine if Inventor had left it alone. Now I get a host of errors since I'm now trying to set the value of a parameter before my Option lines, and outside of a sub.
I suppose this belongs in the "half baked features" bucket since this is a feature, which due to to its poor implementation, feels more like a bug than a feature.
If you'd like, go ahead and try reproducing (reproduce, since I see it as a bug) my scenario. All you need is a sheet metal part with an iLogic rule that references Thickness. Add a random flange, then delete it. Notice that you will now have two line worth of trash at the beginning of your rule.
Hi mrattray,
Ahhh, I see.
I have Inventor 2013 uninstalled at the moment so I can't check, but I do seem to recall that there was a change to the way the Sheet Metal Parameters were created and stored in the file at some point. If you go to the Parameter dialog and look do you see all of the Sheet Metal Parameters listed? Or is that handled differently in 2013?
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
I'm too lazy at the moment to pull up 2012 (I'm about to leave for the day anyway), but I'm pretty sure they're the same. At any rate, yes, all of my sheetmetal parameters live in the parameters dialog.
Hi mrattray,
Okay, I must be thinking of something else as far as the change to sheetmetal parameters. Your screen shot looks just like it alway did.
I just tried the steps I detailed earlier with Inventor 2010 (that's as far back as I can go) and I saw the same results as you describe. It looks like a bug with the way iLogic interacts with the Sheet Metal Parameters to me.
My understanding is that the IdeaStation is the place to report confirmed bugs these days:
http://forums.autodesk.com/t5/Inventor-IdeaStation/bug-report-amp-feedback/idi-p/3807691
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
I didn't realize the idea station was for bugs, too; I thought it was just for suggesting new features. I'll go post it there now. Thanks for your time Curtis, I appreciate it.
For future reference, here is a link to the idea station entry:
Any way to ignore that message?
Its annoying when you creating and deleting parameters on an update of an assembly
Perhaps a way to make the rule immune to that message?
Thanks...
Can't find what you're looking for? Ask the community or share your knowledge.