hexagon logo

python development instances for pc-dmis.

import win32com.client as w32
dmisapp = w32.Dispatch('PCDLRN.Application')
dmispart = dmisapp.ActivePartProgram
dmiscommands = dmispart.Commands

def pc_dmis_report():
    for cmd in dmiscommands:
        if cmd.IsDimension and int(cmd.DimensionCommand.OutTol)==0:
            cmd.SetToggleString(3,165,0)
        else:
            cmd.SetToggleString(4,165,0)

pc_dmis_report()
dmispart.RefreshPart()
Parents
  • AlliumPorrum,
    I am now past that error. Installed the pywin32-221.win-amd64-py3.6 and now I am receiving this error.
    Any ideas.
    Thank you.

    {"alt":"Click image for larger version Name:\tpywintypes.com_error.PNG Views:\t1 Size:\t53.3 KB ID:\t424672","data-align":"none","data-attachmentid":"424672","data-size":"full"}

    Additional Info:
    I installed the Python 3.6 64-bit and pywin32-221.win-amd64-py3.6 on a Windows 10 OS.


    Chances are you actually have the 32bit version of python installed even though it's a 64bit OS. Open cmd and type 'Python"
    It should show you what version you're running. I prefer running 32 bit, personally. Less headaches.

Reply
  • AlliumPorrum,
    I am now past that error. Installed the pywin32-221.win-amd64-py3.6 and now I am receiving this error.
    Any ideas.
    Thank you.

    {"alt":"Click image for larger version Name:\tpywintypes.com_error.PNG Views:\t1 Size:\t53.3 KB ID:\t424672","data-align":"none","data-attachmentid":"424672","data-size":"full"}

    Additional Info:
    I installed the Python 3.6 64-bit and pywin32-221.win-amd64-py3.6 on a Windows 10 OS.


    Chances are you actually have the 32bit version of python installed even though it's a 64bit OS. Open cmd and type 'Python"
    It should show you what version you're running. I prefer running 32 bit, personally. Less headaches.

Children
No Data