Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hello,
In short, all I would love to do is display my filename (motor_mount.prt.73) on my drawing off to the side. These files all exist on a windows network drive, as there is no PDM system in place. I already know my answer is that this cannot be done as it is not supported by Creo. What I am wondering is if anyone has come across some sort of workaround with Relations, Parameters.. etc. It's simple and supported if you use any PDM system, but seems like it cannot be done without one... are there any possible ways?
Thank you all for reading!!!
You can pull the file name (motor_mount.prt) by using my_filename_parameter = rel_model_name and then use a table with &my_filename_parameter in it. You cannot get the iteration number without a PDM system. Iterations on a non-PDM system are useless anyway if you ever do a purge of your folder structure, since only the latest would remain.. IF you are using the iterations for some historical or change reason, I would suggest you rethink that strategy and put something more into the part naming scheme. For revisions, I would use motor_mount_revb.prt or motor_mount_d.prt.
The problem is that because we don't have a PDM system, we rely on scanned hard copies as the master file. The hope was to show what iteration of the part file was the latest when the drawing was signed and scanned (just a note off to the side). This way if it was opened up a year later, and the drawing showed that the same version of the part is being used then I can be fairly confident that the file has been untouched. If it showed 20 iterations higher, well now I have to find out why.
Also, If the directory is purged it still keeps the latest file, which would not be useless for this purpose. I don't care about all the old versions, I just want to make sure people haven't been messing with the part file since the drawing was released.
I am assuming a Windows based server.
When a drawing is scanned and released, move the drawing, scanned master and part/assembly file to a sub folder that your users only have read access to.
They can use the part file in new assemblies but cannot overwrite the released version. If they save a modified version locally, use search paths to always load the released versions of components first before loading the local file.
Hi,
you can find all file version using Windows Search. If this process is time consuming then you can develop AutoIt script with the same functionality.
I hope that AutoIt script can provide a solution. The simplest case is described below:
In this case AutoIt script can (I hope):
AutoIt script can be translated into exe-file and this exe-file can be launched via Creo mapkey.
MH
To expand on what Ben wrote:
I've previously suggested setting up search paths that look at the revisions in reverse order. That way it finds Rev N before Rev B. Done right, this will collect the Rev N model with the Rev N drawing. You will see in the folders if the model was saved after the drawing, so you know right away if there is an unexpected change. You can set the folders to be read-only so that anyone making changes has to save it elsewhere, preferably by first copying to the "in-work" folder which should be first on the search path. Files get moved into the revision control folders only if they are approved to be moved.
Cleaning out the in-work folder is the toughest bit.
I'm more thinking about a work around for showing the iteration. Just thought there could be a way somehow... these other suggestions are great too, just doesn't answer the original question.
I've seen batch files that goes and gets the file name from a system shell command, maybe that is an option. I've never done them but I have used stuff like that in the past.
I think the only place that Creo captures the exact iteration is in the trail file. You would need to parse the trail file to see if those bits could be extracted and look at the time stamps to see if they apply to the currently open files. Start at the end of the latest trail file and work backwards until you hit the iteration that it opened, and count forward from there for each time the model is saved.
The problem is that Creo doesn't know about file system iteration suffixes - if you save a file that had iteration suffix .1000 in a new folder, it gets iteration suffix .1 because Creo determines that number based on folder-by-folder.
What is usually done for such things is to calculate a hash or some other code that is very likely to be unique and note the size of the file. The combination is very hard to accidentally match, so if they do, you have the right items, even if the name changes (or the suffix)
J-Link can get the iteration for sure easily. I guess the J-Link code can also be made associative with the model, but the thing with J-Link is that it is not really easy to set up. Actually, rather difficult i'd say.
I just wrote a lil ahk script to get the window's title and ran it. See the picture bellow. On top is the win's title, on left-hand side is the ahk code and on right side is the resulting MsgBox with the extracted text. Should be easy to weed out the iteration number from there. AHK code can be compiled to an exe file, Creo can run exe files via OS Script mapkeys and populate a value of a parameter.
Hi,
to refresh my knowledge I went to config.pro and found following option which has to be set to see numeric extension in window title.
display_full_object_path YES
MH
Good catch, i got that config set up. Wouldn't know, otherwise. Thanks.