Showing results for 
Search instead for 
Did you mean: 

Minimu distance

Valued Contributor
Valued Contributor


Hello all!


I would like to measure minimum distance in assembly from sketch reference plane

(in assembly) to face of one component


SolidEdgeAssembly.Layout layout =




SolidEdgePart.PartDocument partDoc =




SolidEdgeGeometry.Body bodyObj =

(SolidEdgeGeometry.Body) partDoc.Models.Item(1).Body;


SolidEdgeGeometry.Faces faces = (SolidEdgeGeometry.Faces)

bodyObj.get_Faces( SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryAll);


SolidEdgeGeometry.Face face =

(SolidEdgeGeometry.Face) faces.Item(1);



Array point1 = Array.CreateInstance(typeof(double), 0);

Array point2 = Array.CreateInstance(typeof(double), 0);

double distToCurrent;



face, out distToCurrent,

ref point1, ref point2);


but this function finishes with unknown error. Do you have any Idea what is wrong?


And second thing:


I am quite new in SolidEdge so sorry for stupid questions but I do not know what

is the difference between layout and sketch. As a second test i tried to copy layout

to component and measure minimum distance there (I checked that for two faces it

works) but when I succesfully copy layout to part than in partDoc is not member

"Layouts" but only "Sketches" and it does not have "RefPlane". How can I obtain

object of reference plane for sketches?








Posted by: Jara Ctverak
Post date: 4/23/2007 12:44:15 AM


RE: Minimu distance

Valued Contributor
Valued Contributor


I also try to use MinimumDistance from Circle to Face but I also get error from the face.

If I use MinimumDistance between 2 Circles, It works.


Did you found how to define the face and use it in MinimumDistance???

Please let me know.


Best Regards,

Amir Zeltzer




Posted by: amir zeltzer
Post date: 9/8/2008 5:31:15 AM