Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic Pin Design Help

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
jtylerbc
623 Views, 7 Replies

iLogic Pin Design Help

My company has a design standard for a particular type of large connecting pin that we make and use on a fairly regular basis.  I am attempting to build an iLogic-controlled design template to automate the process of designing pins to the standard.  The pin assembly consists of the actual pin, two retaining end caps (which are themselves a 2-piece assembly), and a number of bolts on each end.

 

The main controlling parameter for the design is the pin diameter.  Based on the pin diameter, a center bolt hole and a circular pattern of bolt holes are toggled according to the following ranges:

7" <= Pin Diameter <= 20"

Center bolt hole feature suppressed in pin and end cap

Corresponding bolt suppressed in assembly

Circular pattern of bolt holes activated in pin and end cap

Circular pattern of bolts activated in assembly

 

3 <= Pin Diameter < 7

Center bolt hole feature activated in pin and end cap

Corresponding bolt activated in assembly

Circular pattern of bolt holes suppressed in pin and end cap

Circular pattern of bolts suppressed in assembly

 

There are also a number of other changes the diameter affects, such as other dimensions on the pin and the number of bolt holes in the circular patterns.  However, these work fine.  My issue relates to the two categories between which the bolt pattern features swap.

 

When in the larger pin range with the circular pattern, I get a "Constraint with Undefined Geometry" error for each of the center bolts.  Is it necessary to suppress those constraints in the iLogic code as well, or is this an indication that I have something set up incorrectly in the code that suppresses the bolts?

 

When in the smaller pin range where the circular patterns are suppressed, I get a similar constraint error, but also get a "Component Pattern Failure".  Is there something specific to component pattern suppression that I may be missing?

 

The most annoying thing about this is that in both cases, the error messages recieved relate to the configuration that isn't being used at all.  Any suggestions would be greatly appreciated.  The portion of my code relating to the component suppression is below.

 

If (3 <= Pin_OD_Assy) AndAlso (Pin_OD_Assy < 7) Then
	Hole_Pattern = 1
	Component.IsActive("End Cap Bolts:1") = False
	Component.IsActive("End Cap Bolts:2") = False
	Component.IsActive("Hex Bolt - Inch 7/8-9 UNC - 2:15") = True
	Component.IsActive("Hex Bolt - Inch 7/8-9 UNC - 2:16") = True
End If


If (7 <= Pin_OD_Assy) AndAlso (Pin_OD_Assy < 12) Then
	Bolt_Circle_Offset_Assy = 1.75
	HOLE_COUNT_Assy = 3
	Hole_Pattern = 2
	Component.IsActive("End Cap Bolts:1") = True
	Component.IsActive("End Cap Bolts:2") = True
	Component.IsActive("Hex Bolt - Inch 7/8-9 UNC - 2:15") = False
	Component.IsActive("Hex Bolt - Inch 7/8-9 UNC - 2:16") = False
	
End If

 

The Hole_Pattern parameter is used to operate a rule in the pin that turns the bolt hole features on and off.  This is then transferred to the end cap by a linked parameter.  All of the model features work perfectly, it is only the bolts that are giving me grief.

 

 

7 REPLIES 7
Message 2 of 8
cwhetten
in reply to: jtylerbc

It sounds like the constraint issues come from an assembly constraint that is tied to some part geometry that disappears in a certain configuration.

 

Like maybe you used an insert constraint to place your bolt into a hole, then the hole gets suppressed and the edge that the bolt was constrained to is no longer there?

 

Try constraining the bolts to an origin plane or workplane or something else that doesn't disappear (or change) in any configuration.  This will make your constraints much more robust, and prevent issues like I mentioned above.

 

The pattern failure issue is another story.  I'm not sure exactly what's happening there.  Are you suppressing the entire pattern, or just certain elements of the pattern?  Is your pattern created based on a feature pattern?  If so, then it will fail if the feature that it is tied to is no longer active.  You might need to provide some more information about that one.

Message 3 of 8
jtylerbc
in reply to: cwhetten

The constraint issue is in fact caused by disappearing geometry.  The unwanted bolt holes are suppressed, and although the corresponding bolt is also suppressed, I get the error.  I guess on that one what I'm asking is if that can be resolved by also having the iLogic rule suppress the constraint, or if there is some other way to go about it.

 

Constraining the bolts to an origin plane is a possibility for the center hole option.  I'm not immediately seeing a good way to do that for the circular pattern on the larger pins, as the bolt circle diameter changes as well.

 

My intent was to suppress the entire pattern, not the elements.  There are two possible quantities of bolts in the pattern, and turning off the entire pattern seemed like the easiest way to get them all in all possible cases.  It is following a feature pattern, just as you guessed.  I thought at first (in an earlier iteration of my code) that the problem was that the hole pattern was being suppressed before the component pattern.  The current version seems to indicate that the order isn't the problem, as I get the same error either way.

 

What would really be nice is if it just didn't give the error message for a component pattern definition that's suppressed anyway.  Since that doesn't seem to be possible, I'm looking for another way around it.  One thing I've considered (but haven't had a chance to try yet) is changing the bolt pattern (and adjusting the iLogic rule) to use the same parameters that are controlling the hole pattern, instead of following the pattern at all.

Message 4 of 8
cwhetten
in reply to: jtylerbc

It looks like suppressing the constraint does make the error go away, so that is an option for you.

 

There is nothing wrong with suppressing the entire pattern.  In fact, this is better than trying to suppress each individual element.

 

The feature-based pattern is going to be a problem.  Even if the component pattern is suppressed, Inventor apparently still checks the definition of the pattern.  I don't know why.  I think your idea of using the same parameters in the assembly as what is in the part is the right idea.  Feature-based patterns are great, but you've discovered one of the limitations.

 

-cwhetten

Please click "Accept as Solution" if this response answers your question.

Message 5 of 8
jtylerbc
in reply to: cwhetten

Prior to reading your post, I had already reworked the model to use a circular pattern with the parameters, rather than the feature-based pattern.  That along with adding the lines of code to suppress the constraints resolved all the remaining issues.

 

One odd thing I've noticed while working on this - the assembly needs to be in a custom LOD for the suppression of the bolts to work.  However, seemingly at random it opens up in Master instead of the custom LOD.  I'm not sure why it does this - my Application Options are set to open "Last Active" LOD, and I haven't had Master active for quite a while.

 

Is it a common thing to add something to the rule to make sure the correct LOD is active before suppressing anything?  Seems like that would fix the issue I'm seeing, I'm just unsure of whether it would have any unintended consequences.

Message 6 of 8
cwhetten
in reply to: jtylerbc

We had that same issue.  We ended up adding a rule to our main assembly document that does exactly what you said: it sets the active LOD to our custom LOD.  We also set an event trigger to run this rule each time the document is opened.  Here is the rule:

 

If ThisDoc.Document IsNot ThisApplication.ActiveDocument Then Return

ThisDoc.Document.ComponentDefinition.RepresentationsManager.LevelofDetailRepresentations("iLogic").Activate
iLogicVb.UpdateWhenDone=True

 

If you have a lot of subassemblies, you will need to make sure that the custom LODs are all linked.  This way, when the top level assembly LOD is set to the custom LOD, each of the subassemblies are also set to the custom LOD.  If you have a deep heirarchy, you might look into Link Levels of Detail, a command found on the Assemble tab > Productivity panel.

 

If I remember correctly, the first line is necessary to prevent errors when the assembly is opened, but is not the active document, such as when you open a drawing and the assembly is opened in the background.

 

Also, the "iLogic" in quotes and parentheses is the name of our custom LOD.  Replace this with the name of your custom LOD.

 

-cwhetten

Message 7 of 8
jtylerbc
in reply to: cwhetten

Thanks.  My situation is a little simpler, so I was able to just add your code into my existing rule and set it to run on the "After Open" trigger.  As long as it's changed the LOD to the appropriate one before it tries to suppress any bolts, all is well.

 

The structure of my model is much simpler than what you're describing - although there is a subassembly, there isn't anything configurable about it, so it works fine from the Master LOD.  Only the top level assembly for the pin is required to be at a custom LOD, because that is where the bolts live, and they're the only parts being suppressed.

 

 

Message 8 of 8
cwhetten
in reply to: jtylerbc

Great!  I'm glad I could help.  Good luck with your future efforts!

 

-cwhetten

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report