Analyzing Patterns

[ Edited ]

Hi all!

We are trying to automate assembly operations.

One of the scenarios is:

- One Part with a Pattern of Holes

- One Part with just Holes in places that match the geometry of the abovementioned Pattern.


Assembling is just the simple AddPlanar and AddAxial in proper combinations. Done that successfully

However, in so doing I first tried (and really would like) using the Hole Occurrences within the Pattern to find the Faces to use in creating the References to use.

Now, *that* eludes me! When I use obj.NumberOfOccurrences I get the correct value. When I try to access them, using Pattern.GetOccurrence, I get bad results(!) There are at least 10 Holes present.


Pattern.GetOccurrence(1) -> the reference Hole object (Good!)

Pattern.GetOccurrence(2) -> Nothing (Hmm!)

Pattern.GetOccurrence(3) -> COM Exception that I'm unable to understand.


Yes, I'm aware of the difference between Fast and Smart Patterns. But still,

I can imagine I don't really grasp them


Anyone with a working code snippet?



Posted by: Maria Reinhammar
Post date: 1/8/2007 9:20:10 PM


RE: Analyzing Patterns

[ Edited ]



I don't have time right this second to look into the problem but I am curiuos if you're aware of a free tool that I created called

Solid Edge Spy.


I think it could really help you understand what's going on in this situation. Also, if you could upload a .zip containing a small assembly showing the example it would help me a bunch. Thanks.


Posted by: Jason Newell
Post date: 1/9/2007 12:10:04 AM

RE: Analyzing Patterns

[ Edited ]

Hi Jason!

I have let the question sleep for some time and essentially solved all other issues but now return to this one.


You asked for an example .asm, so obviously I was somewhat unclear about what I seek.


Given a .par/.psm where I have a Pattern of Holes, as simple as it can get, I encounter the stated problem.


This is not really a big problem since I trivially can get hold of the Face bound to the Hole Occurrence and I do not suffer from that minute extra execution time. It is more a matter of aesthetics when writing my code. I *may*, however, become an issue if our engineers decide to use other than circular Holes in Patterns.




Posted by: Maria Reinhammar
Post date: 2/15/2007 9:37:15 PM