hexagon logo

How to open a python script in pcdmis?

I've got a couple basic scripts running on our programs and you simply go to INSERT > BASIC SCRIPT and chose the .bas file. But it won't let me choose a python file .py.
I tried external command and that doesn't work and I've tried INSERT > FILE I/O COMMAND > FILE OPEN, but when I run the program it runs the program without doing anything inside the python script.

How were those running some python scripts here actually getting pcdmis to open the python script?

Thanks.

Parents Reply Children
  • I'm not sure I understand what you are saying. I'm trying to force the python script to run during the CMM program. The only way I see how to get this to work is have the CMM program call up a .BAS script which in turn calls the python script. I have it working per the code I supplied about which in essence is using the cmd to call the python script.

    I'm at a standstill now until I know exactly how to pass a variable to and from the CMM program using python syntax. I'm going to open a ticket with a rather basic example for them to see if they can show me the light. I have a comment for input labeled "C1" and all I want to do is get that variable into the python script, add a simple number to it, then pass it back. Once I do that I can get some stuff done easier than in VBA, but isn't mission critical at all.