Showing results for
Do you mean

# Reference Origin of Coordinate System object

I am developing a macro that requires me to measure the minumum distance between the origin of a series of coordinate systems and faces.  I have the macro working fine for measuring between two faces, but I am unable to figure out how to refer to the origin of a coordinate system for the MinimumDistance method.

Any thoughts would be greatly appreciated!

Scott

2 REPLIES

## Re: Reference Origin of Coordinate System object

Hi Scott,

you cannot use the Coordinate System as parameter for the MinimumDistance method. It only accepts Geomerty Elements.

Get one of the Axis (which is an Edge) and use the Start Point (Vertex) as parameter.

Snippet

Dim CoordSystem As SolidEdgePart.CoordinateSystem = sePart.CoordinateSystems.Item(1)
Dim ax As SolidEdgeGeometry.Edge = CoordSystem.Axis(SolidEdgePart.CoordinateSystemFeatureConstants.seCoordSysXAxis)
Dim vx As SolidEdgeGeometry.Vertex = ax.StartVertex

sePart.MinimumDistance(vx, Face2, Dist, P1, P2)
regards

JB
VS2015, SE ST10

## Re: Reference Origin of Coordinate System object

Thanks very much! I did not consider that the axis could be an edge. This makes sense now. Thanks so much for your help!

Scott