API - Selecting the Normal to a Plane

Discussion in 'SolidWorks' started by Hacknwhack, Jun 23, 2005.

  1. Hacknwhack

    Hacknwhack Guest

    Hi guys,

    Back again for yet another API questions.

    I want to test the normal of a planer surface against a plane itself.

    To test the surface I simple did the following:
    ThisFeatureSurfaces = ThisFeatureBackStop.GetFaces
    For Each i In ThisFeatureSurfaces
    FaceNorm = i.Normal

    I then can user the elements of the FaceNorm array.

    For the plane however this does not work. I have also tried using
    PlaneParams to no avail.

    What I've done is select the plane I want then:
    Set TestingPlane = SelMgr.GetSelectedObject5(1)
    Debug.Print TestingPlane.Name
    PlaneNormal = TestingPlane.PlaneParams
    Debug.Print "Plane Normals = " & PlaneNormal(0) & ", " & PlaneNormal(1)
    & ", "; PlaneNormal(2)

    My first debug does inface verify that I have the plane I want selected
    however the PlaneParams statement returns the error:"
    "Object doesn't support this property or method"

    Effectively what I'm trying to do is ensure the surface I need to use from
    the top feature is the surface that is not on the plane or in my thinking
    has a normal that is opposite.

    Thanks in advance for the help again

    -hack
     
    Hacknwhack, Jun 23, 2005
    #1
  2. Hacknwhack

    That70sTick Guest

    Surface::planeParams seems only to work for planar surfaces, not datum
    planes. It is part of the Surface object definition.

    For reference lanes, I think you need to use RefPlane::Transform.
     
    That70sTick, Jun 23, 2005
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.