How to use the GetAssemblyReferenceKey from a draft. I want to get the assembly occurrence from a partslist modelnode. Anyone an idea?


Kind Regards




Re: GetAssemblyReferenceKey

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Hi Marthijn,

the documentation of GetAssemblyReferenceKey() is very poor.

But I did some  ivestigation on the returned Byte array.

I seems, that each model node from an assembly has a unique byte array and the first part of the array is equal for the parent model node (assembly) and all child elements.

You also get such a byte array from method GetReferenceKey() of the Occurrence object, which I assume is equal to that from the corresponding ModelNode.

With this information you could find the right Occurrence /SubOccurrence oject. 

I assume you could also use the ComponentName (ModelNode) and Name (Occurrence) properties to parse the tree. But the Name of the Occurrence can be changed by the user. But I think this also reflected in the ModelNode.

I hope this helps, as I never used this in an own program.


VS2015, SE ST10