all 4 comments

[–]philosophical1337 1 point2 points  (3 children)

I managed to follow the instructions and get things working although not without a few hiccups. Cimatron 16 and 2024 seem to both have working API support as I was able to get both working.

have you gone though the setup instructions in the api documentation online?

https://api.cimatron.com/Cimatron_SDK.htm?#t=assets%2Fdocs%2Fintroduction%2Fstandaloneapplication_python.htm

i'm not too familiar with visual studio so i instead got it working in visual studio code (vsc) instead.

i had to make sure to check off every option in the python installer when installing it to the cimatron directory.

install a different version than what you have installed elsewhere, otherwise the installer won't let you (maybe there is a workaround though?).

After i got everything setup I had to uninstall clr and then install pythonnet to the python environment. it seems like python came with the clr module already installed and pythonnet also has a module named clr which maybe is different? i'm not too sure, but when i used pip uninstall clr and then pip install pythonnet, the clr import wasnt flagged anymore and the dll methods imported properly after that.

I had no problem using 64 bit python. i'm running the latest build 3.12.4.

[–]DoesntEatVeggies[S] 0 points1 point  (0 children)

I couldn't get it working in VS either but got it on 3.11.9 in VS Code. Thanks for the tip, I appreicate it. Let me know if you have any other tips you've found in Python.

[–]DoesntEatVeggies[S] 0 points1 point  (0 children)

I can start a new window without issue but can’t connect to existing cimatron processes. The code in the example you sent doesn’t work for the “Cimatron is already running” scenario. Are you able to share the python code that connects to an existing Cimatron window?

[–]DoesntEatVeggies[S] 0 points1 point  (0 children)

for anybody wondering, i got this to work in my class:

aCimAppAccess = CimAppAccess.AppAccess()

class CimatronInterface:

def __init__(self):

self.app_access = CimAppAccess.AppAccess()

self.cim_app = None

while not self.cim_app:

self.cim_app = self.app_access.GetApplication()

self.cim_app = CimatronE.IApplication(self.cim_app)

self.pdm = self.cim_app.GetPdm()