Insert vector feature points at specified locations

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Insert vector feature points at specified locations

    dear guys.how to Insert vector feature points at specified locations?

    there is a pcdmis template as follows,and i want to insert some vector points.but i get "no legal insertion point below"

    ............
    MOVE/CLEARPLANE
    $$ NO,
    INSERT_HERE


    pcdCommands = pcdPartProgram.Commands;

    for (int i = pcdCommands.Count - 1; i >= 0; i--)
    {
    pcdCommand = pcdCommands.Item(i);
    if (pcdCommand != null)
    {
    if (pcdCommand.GetText(PCDLRN.ENUM_FIELD_TYPES.COMMEN T_FIELD, 0).ToString().Contains("INSERT_HERE"))
    {
    Command pointCmd = pcdCommands.Add(pcdOBT.BASIC_HIT, true);
    pointCmd.Marked = true;
    pointCmd.PutText("PT1", pcdEFT.ID, 0);
    pointCmd.PutText("10", pcdEFT.THEO_X, 0);
    pointCmd.PutText("10", pcdEFT.THEO_Y, 0);
    pointCmd.PutText("10", pcdEFT.THEO_Z, 0);
    pointCmd.PutText("0", pcdEFT.THEO_I, 0);
    pointCmd.PutText("0", pcdEFT.THEO_J, 0);
    pointCmd.PutText("1", pcdEFT.THEO_K, 0);

    pointCmd.PutText("10", pcdEFT.MEAS_X, 0);
    pointCmd.PutText("10", pcdEFT.MEAS_Y, 0);
    pointCmd.PutText("10", pcdEFT.MEAS_Z, 0);
    pointCmd.PutText("0", pcdEFT.MEAS_I, 0);
    pointCmd.PutText("0", pcdEFT.MEAS_J, 0);
    pointCmd.PutText("1", pcdEFT.MEAS_K, 0);

    pointCmd.PutText("10", pcdEFT.TARG_X, 0);
    pointCmd.PutText("10", pcdEFT.TARG_Y, 0);
    pointCmd.PutText("10", pcdEFT.TARG_Z, 0);
    pointCmd.PutText("0", pcdEFT.TARG_I, 0);
    pointCmd.PutText("0", pcdEFT.TARG_J, 0);
    pointCmd.PutText("1", pcdEFT.TARG_K, 0);
    pointCmd.ReDraw();
    pcdPartProgram.RefreshPart();
    }
    }
    }


    help!many thx!

  • #2
    I don't follow the c# exactly but I think you're trying to insert basic hits on their own into the program.

    Basic hits must be part of a feature.
    Automettech - Automated Metrology Technology

    Comment


    • #3
      Make a Vector Point in a blank PRG, then export the BASIC and read it. That's the stuff you have to insert.

      Comment


      • #4
        NinjaBadger may be on to something. You would want to insert generic/auto points.

        Comment


        • #5
          The way to generate vectorpoints can be found in the source for "To points". However, here's one way to do it:
          (taken from that very source)

          Code:
          Set cmd = PCDCommands.Add(602, True)
            cmd.Marked = True
            retval = cmd.PutText ("PT1", ID, 0)
            'Theo's
            retval = cmd.PutText (hX, THEO_X, 0)
            retval = cmd.PutText (hY, THEO_Y, 0)
            retval = cmd.PutText (hZ, THEO_Z, 0)
            retval = cmd.PutText (hI, THEO_I, 0)
            retval = cmd.PutText (hJ, THEO_J, 0)
            retval = cmd.PutText (hK, THEO_K, 0)
            'Targ's
            retval = cmd.PutText (hX, TARG_X, 0)
            retval = cmd.PutText (hY, TARG_Y, 0)
            retval = cmd.PutText (hZ, TARG_Z, 0)
            retval = cmd.PutText (hI, TARG_I, 0)
            retval = cmd.PutText (hJ, TARG_J, 0)
            retval = cmd.PutText (hK, TARG_K, 0)
            cmd.ReDraw
            PCDPartProgram.RefreshPart
          Last edited by vpt.se; 08-14-2019, 09:25 AM.
          PC-DMIS CAD++ 2o19 R1 SP4

          Comment


          • #6
            insert/feature/auto/point/vector----i wnna this command
            Command pointCmd = pcdCommands.Add(pcdOBT.VECTOR_HIT, true); right?

            Comment


            • #7
              dear guys,i got it.
              Command pointCmd = pcdCommands.Add(pcdOBT.AUTO_VECTOR_FEATURE, true);

              thank you all!!

              Comment


              • #8
                quentin66 - look at what Ego Murphy said above. It's the best way of looking what's required to generate / add commands in your program using automation methods such as vb and c#.

                Automettech - Automated Metrology Technology

                Comment


                • #9
                  Originally posted by NinjaBadger View Post
                  quentin66 - look at what Ego Murphy said above. It's the best way of looking what's required to generate / add commands in your program using automation methods such as vb and c#.
                  you are right,many thanks

                  Comment

                  Related Topics

                  Collapse

                  Working...
                  X