Reply

GetAssemblyReferenceKey

Hello,

 

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

 

Kind Regards

 

Marthijn

1 REPLY

Re: GetAssemblyReferenceKey

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.

regards

JB
VS2015, SE ST10