Api issue

Hy guys, i nave to take a measure by API

When i preselect the enttity all is ok

The 1 entity is a Plane

The 2nd is a coordinate system

If i create measure it give me an error

The reason is that it doesn t take the origin of the coordinate system

Did anybody know how to bypass this bug?

Or Tell me whats wrong?

Thanks in Advance

SolidworksApi macros