I have been using my free time to study Python scripting so that I could automate tasks at work and improve efficiency. Several of my scripts have been written to make things eaiser in Pro/E so I figured I would go ahead and share them here:
This script was written because several of my colleagues refuse to use Pro/Piping for hydraulic tubes/hoses. Because of this, we had no way of adding CNC bending data to the drawing without remodeling their parts in Pro/Piping. This script attempts to solve that problem by reading in a Pro/E point file and spitting out a CSV file containing the bend data (feed, bend, twist). It is still a work in progress, but I have posted the source code on GitHub:
This script was written at the request of our purchasing department. They were having problems with understanding what changed between revisions on large/busy drawings. The solution was to write a script that compares the PDFs of the two drawings and outputs a JPEG with deleted items highlighted in red and new items highlighted in blue.
This is sort of a poor man's data management system (I use it when I'm away from the office and don't have access to the data management system). The script will scan your working directory and grab the latest revision of every part/assembly/drawing and place them in a subdirectory with the current time stamp. This allows you to grab snapshots during different phases of a design and also allows you to roll back to a specific point very easily.
I would love to hear any feedback that people have on my scripts and I would love to see scripts/hacks from other people that help them get things done!
Python supports win32 COM so it should be possible. Here are some examples with Perl which should be very similar to what Python can do:
Any real example of Python/VB API script??
I tried myself without success:
import win32com.client as win32
asyncconn = win32.gencache.EnsureDispatch("pfcls.pfcAsyncConnection")
conn = asyncconn.Connect(None,None,None,None)
session = conn.Session
Creo point relabel
this script will generate a trail file wich when run will rename all labels in offset point table (must be open). I made a executable file for those who do not know anything of python.