Reply

How can we uniquely identify part names of whole Assembly.??

If the same part is used in many subassemblies, then How we can identify each parts uniquely? 

 

In the attched image, We can find  part "Shoe baseplate.par:1"  in all the sub assemblies of "Pallet Rack_100 x 2.5_M.asm"

 

So now how we can diffferenciate those parts using .net ?

 

 

6 REPLIES

Re: How can we uniquely identify part names of whole Assembly.??

Hi,

 

the physical part (file) is (should) always be the same. Solid Edge assembly documents own a Occurrences collection of Occurrence objects of their 1st level assembly structure. So the Occurrence object is the key to your question i think.

 

Kind regards,
Wolfgang Kunert - www.wksyspro.de

Re: How can we uniquely identify part names of whole Assembly.??

Hi,

 

Thanks for your reply..!

 

Using occurences, we can get occurence object but if we are trying to get the name of that object, we are getting the same name for both occurence objects.

 

Is there any other Property like "PART No." instead of "NAME",  through which we can identify the particular part.??

 

 

 

Re: How can we uniquely identify part names of whole Assembly.??

For sure you'll get the identical set of properties or attributes for all instances of your referenced part. That's the sense of using multiple instances of a single physical part file. Why the part number or even part file name should change? You can't distinguish between the instances, except to their geometric position. This geometric information is part of the Occurrence object.

Kind regards,
Wolfgang Kunert - www.wksyspro.de

Re: How can we uniquely identify part names of whole Assembly.??

If you have a reference to the occurrence in the subassembly, you should be able to use the GetOccurrencesInPath method on the reference. This will return all of the occurrences in the path down to that occurrence which you can then use to build the unique name. Be aware that this will activate occurrences in the path. For an example, you can see the function GenerateOccurrencePathString in the SEAssemblyRelationshipBrowser sample that is delivered in the Custom folder. The only difference in this sample is that it starts with a face reference for a relationship instead of an occurrence reference.

 

Greg

Re: How can we uniquely identify part names of whole Assembly.??

In my opinion it is easier to use the SubOccurrence object to distinguish the same part/subasm in multiple different subassemblies.

On the toplevel, you will continue to use the Occurrence object, but on lower level objects, the SubOccurrence is the object to use.

If you call the GetReferenceKey method on it, you can store persistent data to access the sub occurrence directly at any later moment (by calling the BindKeyToObject method on the toplevel assembly document), even after saving and reloading your project.

And if you need to add any suboccurrence to a highlight set or select set, you can use the Reference property, which will give you the path to your occurrence like @GregLuckett has mentioned in his post.

Re: How can we uniquely identify part names of whole Assembly.??

You also simply could use your own data structure (i.e. HashList) to create pairs of a somehow id and the reference to an Occurrence object.

 

Kind regards,
Wolfgang Kunert - www.wksyspro.de