How to develop PC-DMIS in Python?

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

  • How to develop PC-DMIS in Python?

    Tks!

  • #2
    1) purchase pc dmis
    2) purchase python from pet store
    3) feed discs and instruction manuals to python
    4) in about 24 hours it should push out some results
    Last edited by DAN_M; 03-19-2018, 11:28 AM.

    Comment


    • InspectorJester
      InspectorJester commented
      Editing a comment
      That's what I did! It worked!

  • #3
    3) feed discs and instruction manuals to python----->To whom is the CD-ROM and the instructions to be given?

    Comment


    • dph51
      dph51 commented
      Editing a comment
      John Cleese

    • arttk
      arttk commented
      Editing a comment
      dph51: What?????

    • sealevel
      sealevel commented
      Editing a comment
      dph51..... you want PC-DMIS Forum 12A, Just along the corridor.............

  • #4
    PC-DMIS allows external programs to access, but through the COMM interface. You'd have to create a comm interface and launch a dispatch command etc. etc.

    Comment


    • #5
      Could you use Python for a front-end GUI with a VB engine driving the demon?

      Comment


      • #6
        Yes. I've seen it done with Java in a similar way.

        Comment


        • #7
          Here's a snippet of some of the simple functions I've written in Python with pywin32 for issues I've run across.
          I'm still pretty new to COM automation, so there's probably a lot that could be done better.
          I've messed around in Ruby a bit as well.

          Code:
          import win32com.client as w32 
          import re
          import math
          dmisapp = w32.Dispatch('PCDLRN.Application')
          dmispart = dmisapp.ActivePartProgram
          dmiscommands = dmispart.Commands
          
          def delmvpts(dmiscommands):
            type_list =  [150, 162, 60, 61] # 150:MovePoint, 162:MoveAll 60:Tipchng, 61:Loadprobe
            for cmd in dmiscommands:
              if cmd.Type in type_list:
                print(cmd.ID, " deleted.")
                cmd.Remove()
          
          def addxtheo(dmiscommands):
            for cmd in dmiscommands:
              if cmd.IsFeature:
                initx = cmd.GetText(7,0)
                cmd.PutText(str(float(initx) - 80), 7,0) # Shifts theo X by 80mm
                cmd.PutText(str(float(initx) - 80), 22,0)
          
          def namefeexr(dmiscommands):
            for cmd in dmiscommands:
              if cmd.IsFeature:
                if "A167" in cmd.ID:
                  cmd.ID = cmd.ID.replace("(.*)L", "\1R") # Changes feature name from left to right.
          
          # delmvpts(dmiscommands)
          # addxtheo(dmiscommands)
          namefeexr(dmiscommands)

          Comment


          • arttk
            arttk commented
            Editing a comment
            Great! Thanks!

          • InspectorJester
            InspectorJester commented
            Editing a comment
            Now if only I could implement this on a Raspberry Pi...
        Working...
        X