Traverse assembly to measure height of each component

Hi all,

I am working on a printed circuit board project that want to measure the height relative to the PCB surface.

PCA'd CAD is build by Circutworks by the way.

Anyone know similar api that works?

First challange is to seperate components that at top surface and bottom surface, this can be done by check their coordinates. bottom parts will have negative value at z direction.

Second problem is that, how to measure each component's height relative to a specific surface.

Case 1: componets that has CWX cordinates. This is the idea case because it has a coordiate, which make measurement easy. Just need measure the max distance at Z direction. (Componets could be signle part, or assembly)

Case 2: componets that does not have CWX cordinates, need to figure out which side is the Z direction. This part I have no idea how to do it.

SolidworksApi/macros