Method for Listing All Mating Holes in Assembly

Method for Listing All Mating Holes in Assembly

patrick.b7
Contributor Contributor
353 Views
1 Reply
Message 1 of 2

Method for Listing All Mating Holes in Assembly

patrick.b7
Contributor
Contributor

Hello,

 

I am currently brainstorming a method in which all pairs of holes constrained together in an assembly (e.g. one tapped & one clearance hole, one tapped & two clearance holes, etc.) could somehow be generated into a list that specifies all the hardware required for that assembly. I am new to iLogic, have written a few rules but mostly from copying and pasting chunks of code from these forums. I don't expect someone to code a whole rule and send it to me for free, but I thought it'd be interesting to pick your brains on this subject.

 

This would be incredibly useful as it would allow the assemblers at my company to prepare a distinct list of hardware needed for the job, rather than (for example) seeing "10-32 SHCS" on a print, going and searching for a socket head cap screw of that length, and occasionally having us order more which forces project deadlines back due to lack of preparedness.

 

I do not prepare this list manually as I simply do not have enough time due to our small engineering workforce. So, I must ask if anyone has come across iLogic rules or methods to pull a list of mating holes from each relationship in an assembly to then be generated into a separate parts list? Here is an example of what I was imagining could go next to the parts list in it's own separate table:

 

HARDWARE LIST

 

Part_1 & Part_2:

1/4-20 SHCS, 3/4" Length

8-32 FHCS, 1/4" Length

 

Part_4 & Part_1:

1/4-20 FHCS, 1/2" Length

 

....... etc.

 

I'm imagining that the length would be difficult to obtain as some holes are placed "Through All" which does not generate any sort of length associated with that feature. Let me know what you guys think about this - thank you for your time!

 

 

 

Patrick Barnes
Mechanical Design Engineer
Inventor Professional - Vault
0 Likes
354 Views
1 Reply
Reply (1)
Message 2 of 2

JelteDeJong
Mentor
Mentor

Its not hard to loop over all constraints and list the affected occurences.

 

Dim doc As AssemblyDocument = ThisApplication.ActiveDocument

For Each Constraint As AssemblyConstraint In doc.ComponentDefinition.Constraints
    If (Constraint.Type = ObjectTypeEnum.kInsertConstraintObject) Then
        Dim partName1 = Constraint.AffectedOccurrenceOne._DisplayName
        Dim partName2 = Constraint.AffectedOccurrenceTwo._DisplayName
        MsgBox(String.Format("{0} - {1}", partName1, partName2))
    End If
Next

but i doubt if its practicaly.

i filtered out here only the "InsertConstraint" but users will probaly also find other ways to constrsaint holes. like a mate constraint over the center of the hole.

Maby not holes are constraint, for exampe a flange with 10 holes users will probaly only constraint 2 of them becuase it will be fixed. in that situation u will miss data

depth of the hole is very hard to find i think. like you said threu all holes have no depth but you also have to think about holes that are not a hole feature but a extrusion of a circle...

 

 

 

 

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes