Need help with code

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

  • Need help with code

    What I am trying to do is this:
    - measure hole size with the pin,
    - insert oversized pin into the same hole so it sits tight and measure on the CMM to get coordinates of the center,
    - program prompt to enter diameter from pin measurement,
    - generic circle with coordinates of the CMM measurement and diameter entered from the prompt.

    Need help with the code - please and thank you.

  • #2
    Can I ask why? As in why not just measure with the CMM?
    Applications Engineer
    Hexagon UK

    Comment


    • #3
      I am working with plastic, dealing with surface imperfections, flash, etc.

      Comment


      • #4
        Don't you know the pin size already?
        Whatever a man sows, he shall reap.

        Comment


        • #5
          Originally posted by bfire85 View Post
          Don't you know the pin size already?
          The idea is to have program written before pin size is known.

          Comment


          • #6
            measure circle CIRC_COORD on the pin to get the coordinates
            Insert -> Dimension -> KeyIn… give it an understandable name, like PIN_DIAM
            Insert -> Feature -> Generic… select circle, give it a suitable name (I use GENERIC_CIRC in this example) and fill in the nominal values

            Now, with the EditWindow in Command mode, add the code
            Code:
            ASSIGN/GENERIC_CIRC.ALL=CIRC_COORD.ALL (this copies only measured data from CIRC_COORD to GENERIC_CIRC)
            ASSIGN/GENERIC_CIRC.DIAM=PIN_DIAM.MEAS (overwrite with the pin diameter)
            and then dimension whatever you want from GENERIC_CIRC.
            AndersI
            SW support - Hexagon Metrology Nordic AB

            Comment


            • JEFMAN
              JEFMAN commented
              Editing a comment
              The diameter could also be entered in a input comment ?

            • AndersI
              AndersI commented
              Editing a comment
              Of course. KeyIn was just the first thing that I came to think of, as it was a dimension...

          • #7
            Thank you.

            Comment


            • #8
              You could also use the actual measured pin diameter without asking the user.
              PC-DMIS CAD++ 2o22.2 SP3

              Comment

              Related Topics

              Collapse

              Working...
              X