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 code not functionin g correctly
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
The problem is that for some reason the bolts constraints are not suppressing. It is simple on/off code but for some reason I am still getting constraint and component errors.
Had to add " " to get code to post...I don't actually have them in my code.
Here is the code:
"If HopperType = "10TADL" Or HopperType = "12BH" Or HopperType = "12TAD" Then
Component.IsActive("Component Pattern 1:1") = True
Component.IsActive("Hex Bolt - Inch 5/16-18 UNC - 1:1") = True
Component.IsActive("Hex Bolt - Inch 5/16-18 UNC - 1:2") = True
Component.IsActive("Hex Nut - Inch 5/16 - 18:1") = True
Component.IsActive("Hex Nut - Inch 5/16 - 18:2") = True
Constraint.IsActive("Insert:1") = True
Constraint.IsActive("Mate:80") = True
Constraint.IsActive("Mate:78") = True
ElseIf HopperType <> "10TADL" Or HopperType <> "12BH" Or HopperType <> "12TAD" Then
Component.IsActive("Component Pattern 1:1") = False
Component.IsActive("Hex Bolt - Inch 5/16-18 UNC - 1:1") = False
Component.IsActive("Hex Bolt - Inch 5/16-18 UNC - 1:2") = False
Component.IsActive("Hex Nut - Inch 5/16 - 18:1") = False
Component.IsActive("Hex Nut - Inch 5/16 - 18:2") = False
Constraint.IsActive("Insert:1") = False
Constraint.IsActive("Mate:80") = False
Constraint.IsActive("Mate:78") = False
End If"
Re: iLogic code not functionin g correctly
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
As you are getting your bolts and nuts suppressed
I assume you have a custom level of representation
Please find the attached simulated condition the suppression condition is something
different : open model Bolted and unsuppress the connections
I have modeled 1 bolted connection and other place from content center at the same location
And then run the rules
Else please share the sample file
Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013
-----------------------------------------------------------------------------
Re: iLogic code not functionin g correctly
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
If you are simply trying to suppress your hardware there is no need to suppress the constraints
try "commenting out" those lines and run the rules again
Similarly there is no need to suppress each instance of your pattern
Re: iLogic code not functionin g correctly
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
That is the problem I originally did just suppress the component pattern, but it still thru constraint errors eventhough they should have been shut off in all hopper types except those three listed.
Re: iLogic code not functionin g correctly
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Even coding it like this...the Component Pattern 1:1 is still active and giving error in Design Doctor.
If HopperType = "10TADL" Then
Component.IsActive("Component Pattern 1:1") = True
Component.IsActive("Hex Nut - Inch 5/16 - 18:1") = True
Component.IsActive("Hex Nut - Inch 5/16 - 18:2") = True
ElseIf HopperType = "12BH" Then
Component.IsActive("Component Pattern 1:1") = True
Component.IsActive("Hex Nut - Inch 5/16 - 18:1") = True
Component.IsActive("Hex Nut - Inch 5/16 - 18:2") = True
ElseIf HopperType = "12TAD" Then
Component.IsActive("Component Pattern 1:1") = True
Component.IsActive("Hex Nut - Inch 5/16 - 18:1") = True
Component.IsActive("Hex Nut - Inch 5/16 - 18:2") = True
Else
Component.IsActive("Component Pattern 1:1") = False
Component.IsActive("Hex Nut - Inch 5/16 - 18:1") = False
Component.IsActive("Hex Nut - Inch 5/16 - 18:2") = False
End If
Re: iLogic code not functionin g correctly
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I wanted to give a quick thanks to ya'all for your help so far...
Eventhough it has solved the issue, I was able to go though all the other rules and really thin them down....THANKS
Re: iLogic code not functionin g correctly
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
After using the form I created and switching hopper types I am finding out that the other hopper types that are suppsed to have the nuts and bolts in them aren't correct either.
What is happening is that the nuts and bolts are active but the constraints to put them in place are not activating, so they end up where ever on the end plate of the hopper.
See Pic : http://screencast.com/t/c9SHhdJL
Re: iLogic code not functionin g correctly
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Seems my typing skills need some help...
Breeze104 wrote:I wanted to give a quick thanks to ya'all for your help so far...
Eventhough it has solved the issue, I was able to go though all the other rules and really thin them down....THANKS
Was suppsed to read "Eventhough it hasn't solved the issue......"
Sorry about that
Re: iLogic code not functionin g correctly
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
One other thing I have noticed looking over things.....is that if I right click on Component Patteren 1:1 is shows a check mark by "Suppressed", but for some reason it is throwing the "Component Pattern failure" error in Design Doctor.
Re: iLogic code not functionin g correctly
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Ok,
I made a small test to show how this pattern suppression works.
This code suppresses the pattern named "my_pattern" and all of the instances of that pattern.
Based on the value of the parameter "my_configuration"
It does not to "touch" the constraints........these are still needed
trigger
= iTrigger0
if
my_configuration = 0 then
Component.IsActive
("my_pattern") = False
else
Component.IsActive
("my_pattern") = True
end if
iLogicVb.UpdateWhenDone
= True



