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"
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
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
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.
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
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
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
Seems my typing skills need some help...
@Anonymous 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
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.
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
Why did u add the trigger?
So you are saying that I need to shut off the constraints as well?
The trigger is optional
What i am trying to show you is the code required to suppress a pattern without generating any errors.
If you are using similar code and getting errors then the problem is not with the code
This is how the code stands currently... Had to turn constraints on & off cuz they wouldn't turn on/off just by turning Component Pattern on & off.
And since I am still getting the issue do you have any ideas as to why?
iProperties.Value("Project", "Project") = HopperType
InventorVb.DocumentUpdate(True)
If HopperType = "10TADL" Or HopperType = "12BH" Or 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
Constraint.IsActive("Mate:78") = True
Constraint.IsActive("Mate:80") = True
Constraint.IsActive("Insert:1") = 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
Constraint.IsActive("Mate:78") = False
Constraint.IsActive("Mate:80") = False
Constraint.IsActive("Insert:1") = False
End If
Parameter.UpdateAfterChange = True
I really need to get this figured out because I still have about 40 more nuts and bolts to add to the assembly before it is all over...LOL
forget your ilogic code for a moment.
If you suppress a pattern manually do you need to suppress the constraints also? (the answer is no)
You should not need to suppress any constraints with your code. If you get error messages when you do not then i think this is a problem with the constraints in the model
Difficult to where exactly without having the model
Well I am going to send in a ticket to Autodesk and see what I get back. I will try to remember to post the answer.
Here is the answer I got from Autodesk...
"You won’t have any issues with mates in design accelerator components like bolted connections because it uses iMates – see attached video. The issue comes when you are suppressing a hole on one of the parts involved in the bolted connection – it will go from using an iMate to a normal (non-design accelerator-induced) constraint and then the constraint would have to be part of the rule too. Once, the hole is gone or the bolted connection has been made from a pre-existing hole and it’s been suppressed similarly in the part, the bolted connection intelligence is taken out of that hole in the assembly and a normal constraint, rather than an iMate is used and this constraint has to be also suppressed in the rule."
Here is a link to where you can get videos...you will have to download them.