PC-DMIS Measurement Routine Migrations by Don Ruggieri
Starting with PC-DMIS 2021.2, PC-DMIS doesn’t allow loading of measurement routines created in PC-DMIS 2015 and earlier and will generate an error. See: I am getting the error message "Serialization error This version of PC-DMIS can only read measurement routines created in version...."
In PC-DMIS 2022.1, only PRG files from 2016 or newer will be allowed. This “rolling” restriction will continue with each new release of PC-DMIS.
For instance:
Installed Version Can read back to (or pull forward from)
2021.2 2015.1
2022.1 2016
Future projection:
2022.2 2017 R1
2023.1 2017 R2
2023.2 2018 R1
Etc.
To use older routines with a current PC-DMIS release, you need to save all the older measurement routines to any version at least as recent as that defined by the current restrictions. This can be done one file at a time but if you have a significant number of files it can be very time-consuming. To help facilitate this process, we’ve created and shared two utilities.
Conversion Utilities for PC-DMIS (hexagonmi.com)
Utility Home : SaveMRtoRequiredVersion
This will automatically open the measurement routines and save them to the desired version. (simply opens, saves and closes routines)
Utility #2: Migration_Utility
This is a little more intelligent and performs the same task as utility 1 but also handles migration from Xactmeasure to the new, geometric tolerance command. It requires you to install the most recent service pack of 2020 R1 as well as your desired version (2020 R2 or higher). It asks you to navigate to three folders – the source folder containing your routines, a destination for routines that generate migration reports and a destination for routines that do not generate migration reports. The utility will then sort routines into the relevant destination folders making it easier for you to identify those that migrated successfully and those that require editing. Please see here for a more detailed description: Documentation. It also saves probe files associated with each routine in the current probe format.
While these utilities are being provided free of charge, there is no implied support. Please be sure to back-up all of your files before starting this process.
*** Please be sure to read the help documentation on these tools. It is brief and will often answer the very questions which we are seeing posted here.
RE: PC-DMIS Measurement Routine Migrations by JacobCheverie: Very nice, thanks Don.
RE: PC-DMIS Measurement Routine Migrations by Don Ruggieri: I am just the messenger, but appreciate the reply, and any future feedback
RE: PC-DMIS Measurement Routine Migrations by akifla: Thanks a lot for the information.
I wonder why i get tons of webinar/advertisement mails from Hexagon but no such important information by e-mail ?
RE: PC-DMIS Measurement Routine Migrations by Vandy: Thank you.
RE: PC-DMIS Measurement Routine Migrations by JacobCheverie: neil.challinor Thank you for this excellent migration utility Neil. Quick question for you - I have 2020 R2 build 667 open and when attempting to run the utility I receive "Please launch the PC-DMIS 2020 R2 or higher and re-run this application". I'm not sure what I missed other than this - The documentation states that I need 2020 R1 installed for the first stage of migration. Is this the reason for the error that I'm receiving?
EDIT: I've installed 2020 R1 and set search paths correctly on everything, the error still persists.
RE: PC-DMIS Measurement Routine Migrations by vpt.se: Tried running PC-DMIS as admin?
RE: PC-DMIS Measurement Routine Migrations by Neil Challinor: Hi Jacob, I just tried it at my end with the same version (2020 R2 #667) and it worked correctly. Tried running PC-Dmis as Admin and running as normal - both worked. Tried running the utility as admin and running as normal - again, both worked. The utility is written in C# and uses the GetProcesses.ProcessName and GetProcesses.MainWindowTitle methods to identify whether PC-Dmis is running and if so, what version it is. I can only assume something must be blocking it from reading that information.
RE: PC-DMIS Measurement Routine Migrations by JacobCheverie: I'll try to run with admin privileges and see if that helps. Thanks guys.
RE: PC-DMIS Measurement Routine Migrations by JacobCheverie: neil.challinor I have ensured that I am running with full admin privileges and I am receiving the same error. Do you know what condition must occur for the utility to throw that message?
RE: PC-DMIS Measurement Routine Migrations by Neil Challinor: JacobCheverie
It's literally looking through the list of currently running windows processes - like if you open task manager.
foreach (var PRO in Process.GetProcesses()) { if (string.Compare(PRO.ProcessName, "PCDLRN", StringComparison.OrdinalIgnoreCase) == 0) { found_pcd = true; //pcd_name = Convert.ToString(string.Compare(PRO.MainWindowTitl e, "20", StringComparison.OrdinalIgnoreCase) == 0); pcd_name = PRO.MainWindowTitle.Substring(PRO.MainWindowTitle. IndexOf("20", 0)); pcd_name = pcd_name.Substring(0, 4); pcd_ver = PRO.MainWindowTitle.Substring(19, 1); fullname = pcd_name + "." + pcd_ver; string gid = ""; if (pcd_name == "2020") { gid = "15.2"; } if (fullname == "2021.1") { gid = "16.1"; } if (fullname == "2021.2") { gid = "16.2"; } if (fullname == "2022.1") { gid = "17.1"; } if (fullname == "2022.2") { gid = "17.2"; } ver_id = "PCDLRN.Application." + gid; // pcd_ver = Strings.Right(PRO.MainWindowTitle, PRO.MainWindowTitle.Length - pcd_name + 1) var Name = Convert.ToInt32(pcd_name); if (Name > 2020) { Valid_ver = true; } if (Name == 2020) { pcd_ver = PRO.MainWindowTitle.Substring(19, 2); if (pcd_ver == "R2") { Valid_ver = true; } } } }
RE: PC-DMIS Measurement Routine Migrations by vpt.se: JacobCheverie When PC-DMIS and the migrationutility is running, start a command line and type "tasklist > processes.txt". This will create a list of processes currently running and saves them as "processes.txt". See if you can find PCDLRN.EXE in that list or post the contents of processes.txt here.
Also, the migration utility sets all versions > 2020 as valid versions and 2020 R2 as the lowest valid version. We don't know what is done with the "ver_id" later on, but the code Neil posted sure looks like the PCDLRN process finder and sets the version from the window title.
RE: PC-DMIS Measurement Routine Migrations by JacobCheverie: Thanks Neil, I’ll do some follow-up testing on Monday.
RE: PC-DMIS Measurement Routine Migrations by JacobCheverie: Thanks for the idea, I’ll give that a shot.
The migration utility works in two stages. The first stage is converting older programs/probes to 2020 R1 format. The second stage is to take all of those 2020 R1 programs and make the leap to your desired version of PCD that includes the Geometric Tolerance command.
In any event, I’m running 2020 R2 and it’s still not happy with me. I’ll try your suggestion and also running 2021.1. Being a different case in Neil’s conditional tree, perhaps I’ll see a difference in the outcome.
RE: PC-DMIS Measurement Routine Migrations by vpt.se: On the other hand, you can also use this:
https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer
I assume you have tried running both the migration utility AND PC-DMIS as admin?
RE: PC-DMIS Measurement Routine Migrations by JacobCheverie: vpt.se Processes.txt shows PCDLRN.exe and Migration_Utility.exe running. Interestingly, if I attempt to run the migration utility without PC-DMIS running, I receive a different error (PC-DMIS is not running...). It knows PC-DMIS is running, it's just having an issue with determining which version it is.
neil.challinor The migration utility starts running when using a later version of PC-DMIS (2021.1 build 526). It finds 2020 R1 just fine for first stage migration, allows me to select the three folders, and converts the program to 2020 R1 format. I then receive an unhandled exception error saying "Assert.Fail failed" and the utility says "PC-DMIS did not launch properly". Any clue what might be going wrong? The utility seems to not like my version of 2020 R2.
RE: PC-DMIS Measurement Routine Migrations by Neil Challinor: JacobCheverie Is this PC on a network or stand alone? Were all the versions installed as admin into the default folder locations and run as admin for the first time? It still sounds like there may be some permissions related type problem. Maybe a network domain policy messing things up or something to that effect.
RE: PC-DMIS Measurement Routine Migrations by JacobCheverie: neil.challinor The PC is on a network. Every version was installed as admin into the default folder locations and they were all run as admin for the first time. I've tried an earlier build of 2020 R2 with no luck, I've tried to Reset Product, and I've tried to reinstall the software entirely. The utility is working with every version but the most critical one. I'll press on with manual migration for now. If you think of anything, let me know. Thanks.
RE: PC-DMIS Measurement Routine Migrations by JacobCheverie: neil.challinor Using PC-DMIS 2021.1+ at least lets me get started. One thing I noticed is the migration status window says, for PC-DMIS 2022.1, "valid version found:2022.(". The number after the decimal is showing "(" for any version of PC-DMIS I try. Could this explain the issue with why it will save in 2020 R1 format but fail when opening the target version? Is there an issue with the name that it obtains?
** pcd_ver = PRO.MainWindowTitle.Substring(19, 1); returns "("
** pcd_ver = PRO.MainWindowTitle.Substring(17, 1); returns the correct version number.
** Why would this be different for me than you?
RE: PC-DMIS Measurement Routine Migrations by vpt.se: JacobCheverie Please post a snapshot of the windowtitle of your 2020 R2 version.
RE: PC-DMIS Measurement Routine Migrations by vpt.se: I believe the logic for obtaining the pcd_ver value is flawed. The parenthesis you see in the label text is probably the first parenthesis from the "(release)" text in the windowtitle... Please post a screenshot of your windowtitle/caption from your 2020 R2 version.
pcd_ver = PRO.MainWindowTitle.Substring(19, 1);
The position to look for pcd_ver is hardcoded at string index 19 with a length of 1.
RE: PC-DMIS Measurement Routine Migrations by vpt.se: PC-DMIS CAD++ 2022. 1 (release) - Maskin1
PC-DMIS CAD++ 2020R 2 (release) - Maskin1
PC-DMIS CAD 2020R2 (release) - Maskin1
PC-DMIS PRO 2020R2 (release) - Maskin1
String position 19 is red and bold in the examples above. Depending on which variant you have (PRO/CAD/CAD++) the hardcoded string index the migrationutility looks for might fail.
RE: PC-DMIS Measurement Routine Migrations by JacobCheverie: vpt.se I just stumbled upon that issue myself after some basic debugging in Visual Studio. See the attached image.
Neil, perhaps you can modify the utility to get the version number by working from the index PRO.MainWindowTitle.IndexOf("20", 0) + 4?
RE: PC-DMIS Measurement Routine Migrations by Neil Challinor: I asked the person who wrote the utility to look into it. When I originally discussed how to determine which PC-DMIS version was running with him, I shared a VB.net example in which I used InStr. I'm not familiar with C# so I don't know if what he's doing is equivalent or not. Most likely, he has his logic wrong - although I'm curious as to why it runs fine on my system if that's the case - I installed the same versions as you? He's based in India so I won't get a response until tomorrow (at the time of writing this it's 9:15pm for him).
RE: PC-DMIS Measurement Routine Migrations by JacobCheverie: neil.challinor I would assume you are running PC-DMIS CAD++ whereas I'm just running PC-DMIS CAD. The location of the version number will be different in each of our cases and the code is not dynamic enough to account for different levels of PC-DMIS. Thank you for escalating this, I'm looking forward to using the utility.
RE: PC-DMIS Measurement Routine Migrations by Neil Challinor: @jacobCheverie
Just a quick update. We're working on a new version of the migration utility that uses a different method to identify the PC-DMIS version. We hope to make it available within the next few days.
RE: PC-DMIS Measurement Routine Migrations by JacobCheverie: Thanks Neil.
RE: PC-DMIS Measurement Routine Migrations by Neil Challinor: JacobCheverie
I believe one of my team contacted you and supplied an updated version of the migration utility that resolves the issues you were having?
I just wanted to make everybody who reads this page aware that the new version is now available to download using the links supplied at the top of this thread: https://www.pcdmisforum.com/forum/pc-dmis-enterprise-metrology-software/pc-dmis-for-cmms/511579-pc-dmis-measurement-routine-migrations#post511579
Please feel free to contact me should you have any feedback on the use of the migration tool or encounter any more problems with it.
RE: PC-DMIS Measurement Routine Migrations by Trevor McLaughlin: neil.challinor I'm hoping you can help me out with this.
I’m working with a customer who is hitting a brick wall when trying to use the conversion utility.
He has v2022.1 installed and attempting to convert v2014 programs. Here’s the problem described in his words:
“We copied one of our Routines into a separate folder on the desktop called “Convert_this” (just to keep things separate and make sure that if there was any file corruption that we did not lose our original files. Open the Conversion Utility, MRPath set to the “Convert_this” folder on the desktop, set the LogPath as the same location, checked the box for Sub-Folders, clicked Convert. Less than 2 minutes later it kicks out with the error message previously attached.
Due to the .NET Framework message, I proceeded to update and install .NET 3.5 to 4.8 components with no change.
I also read the page where you may need to run the Migration Utility after the Conversion, so we tried that on the files as well with no luck. We have tried multiple different routines with the same result. We have also tried placing the files in C:\temp just to give it a different location.”
I’ve requested copies of his old programs so I can test on my end but haven’t heard back. Any thoughts?
Attached Files
RE: PC-DMIS Measurement Routine Migrations by Don Ruggieri: This seems like a problem unrelated to the utility itself. The error message implies there is an access or permissions issue with the folder they've created. I would suggest they consult with their own IT department on where they can place these files that would not have such permissions issues. I am thinking that the Users folders area would be a good place to start -
C:\Users\Public\Documents
RE: PC-DMIS Measurement Routine Migrations by vpt.se: ...or the root of C:\
You could also try setting the LogPath to something else than the migration path, just in case of file/folder locks.
RE: PC-DMIS Measurement Routine Migrations by Trevor McLaughlin: Don Ruggieri vpt.se
We've tried many different folder locations for the old programs including C:\Users\Public\Documents all without success. I'm getting the same failures on my laptop and I have no admin restrictions.
In every case in my testing, the log file reports " ***.prg didn't open properly" When I right clicked the utility and chose "run as administrator" I got the .net framework error message. Not sure what's going on there.
The utility is a great idea and we have MANY customers who could benefit from it. Unfortunately, as things stand now, being unable to easily migrate numerous pre v2015.1 programs to v2022 is becoming a significant deterrent to selling upgrades.
I will continue testing on my end. You assistance is greatly appreciated!
RE: PC-DMIS Measurement Routine Migrations by vpt.se: Trevor McLaughlin If you can trigger the .NET error, click on the "Details" button and copy paste that here, or take a screenshot of what the details contain.
Hopefully, the details can say where in the migration utility it fails. But, I believe the reason for the error might be explained below.
You need to have 2020 R1 installed for versions earlier than 2015.1:
RE: PC-DMIS Measurement Routine Migrations by Trevor McLaughlin: vpt.se I have every version of pcdmis from 2015.1 installed on my laptop, but my customer may not.
I only ever see the .net framework error pop up when I run the utility as admin, otherwise I get the "couldn't properly open program" log error.
I'd like to see the selection of "your chosen version" to be a little more intuitive. From what I understand, you need to run your "chosen version" as admin to set this as the version for the conversion. Correct me if I'm wrong. A dropdown selection list would be an improvement I think.
Here is the copied details of the error message in a text file error details.txt
RE: PC-DMIS Measurement Routine Migrations by vpt.se: Trevor McLaughlin
Have you tried starting 2020 R1 as admin, close it and then running the migration utility?
It errors out trying to start the program with CLSID {F8AB340E-C31E-4AAF-8C70-B6A549B075DE} which I assume is whatever PC-DMIS version that was last executed as admin on your laptop.
If I understood correctly, the error appears as soon as you click the Convert button (you don't see any instances of PC-DMIS open after you click Convert)?
Is the utility able to start PC-DMIS successfully when NOT running as admin?
Try the other migration utility as well to see if that might work better (Migration Utility Installer).
RE: PC-DMIS Measurement Routine Migrations by Trevor McLaughlin: That worked!
I opened 2020R1 as admin, closed it then ran the utility and was able to open the converted 2014 program in 2022. It's a few hoops to jump through but I may be able to sell it.
Hopefully this utility gets tweaked a bit; it's a little rough around that edges at the moment.
I'll offer this solution to my customer and update this thread with the results.
Thanks again for the help!
RE: PC-DMIS Measurement Routine Migrations by vpt.se:
That worked!
I opened 2020R1 as admin, closed it then ran the utility and was able to open the converted 2014 program in 2022. It's a few hoops to jump through but I may be able to sell it.
Hopefully this utility gets tweaked a bit; it's a little rough around that edges at the moment.
I'll offer this solution to my customer and update this thread with the results.
Thanks again for the help!
No worries! Glad to have helped!
RE: PC-DMIS Measurement Routine Migrations by vpt.se: neil.challinor
Regarding "Migration Utility Installer.exe", it is imperative that users don't change the default installation folder when prompted during the installation.
It seems that all file and folder paths for the migration program is hardcoded to the default installation path and if you choose to install it to another location, the program will error out (the PDF with instructions isn't found as well as the language strings XML).
Just a heads-up.
RE: PC-DMIS Measurement Routine Migrations by Trevor McLaughlin: I didn't encounter any prompts during the install. I just downloaded the .exe file from here https://downloads.ms.hexagonmi.com/Utilities/PC-DMIS%20Conversion%20Utilities/SaveMRstoRequiredVersion%20Utility%20(Schema)
It took a few seconds and to run it I just double clicked the file.
Is there a different installer that I should be using?
RE: PC-DMIS Measurement Routine Migrations by vpt.se: There is another, more "meaty" migration utility, with an installer. It is said to perform the same as the first (the one you are using) but with more options and it also converts XactMeasure commands to GeoTol commands (which the first one doesn't).
I don't know how versatile it is with programs pre-2015.1 though. You can try that as well to see if it does what you need it to do.
But, like I wrote in the message above, do NOT change the default install location or the utility won't work.
The first utility is just an app ready to run. The second one needs installation before you can use it.
RE: PC-DMIS Measurement Routine Migrations by Trevor McLaughlin: Ok, thanks. I'm sure I'll be using both of these in the months and years ahead.
RE: PC-DMIS Measurement Routine Migrations by Neil Challinor: You are correct, users should not change the default install directory or the utility will not work.
RE: PC-DMIS Measurement Routine Migrations by wrangler325: Thank you Don, awesome.
RE: PC-DMIS Measurement Routine Migrations by JacobCheverie: Hi neil.challinor . Can you or the dev who was working on this explain what the reason might be behind this error when using the utility? I had a group of 1600 or so programs converted successfully to 2020 R1 using the utility. After converting just a handful to 2022.1, the application threw this exception and now I will have to re-run all 1600 programs through the utility (about 13 hours).
System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at PCDLRN.IApplication.set_UserExit(Boolean )
at Migration_Utlity.Form1.migrate()
at Migration_Utlity.Form1.buttonCommon()
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
RE: PC-DMIS Measurement Routine Migrations by Neil Challinor: I'm not sure. I've asked the developer to investigate but he's out today.
RE: PC-DMIS Measurement Routine Migrations by JacobCheverie: Thank you Neil.
RE: PC-DMIS Measurement Routine Migrations by Don Ruggieri: I know we've tried this with a collection of quite a few programs but I don't think we've gotten near 1600 in our tests. We will certainly investigate the error, but in general I would suggest you convert smaller batches anyway. Maybe just create a separate folder where you copy 400 at a time and see if that helps?
RE: PC-DMIS Measurement Routine Migrations by vpt.se: Did PC-DMIS close out OK when this error occured?
I am thinking either PC-DMIS froze (not replying to the RPC call) or closed out prematurely (for some reason) generating the RPC error.
RE: PC-DMIS Measurement Routine Migrations by JacobCheverie: I've created a subfolder where I'm processing 100 programs at a time. This still lead to the same error on occasion. I am attempting to convert to 2022.1. I changed my active version of PC-DMIS to the latest 2020 R2 and the conversion process seems a bit smoother - I haven't seen an error yet after a few hundred programs. I'll continue converting to 2020 R2 so the changes to the Geometric Tolerance command are processed, and from there I should be fine to simply open the programs in 2022.1. Thanks for the help.
RE: PC-DMIS Measurement Routine Migrations by JacobCheverie: PC-DMIS would simply close prematurely. I have no clue why. I'm running 2020 R2 now with better results.
RE: PC-DMIS Measurement Routine Migrations by LostL: No chance of Hexagon giving out the source for that? Prickly IT-environment and likely a need to adapt to work with the present folder structure.
RE: PC-DMIS Measurement Routine Migrations by ksmith@wirtzusa.com: Running into this .net error, Converting 2012 to 2018 so they can be used in 2022.2. Any help would be appreciated. Thanks
Attached Files
RE: PC-DMIS Measurement Routine Migrations by vpt.se:
Running into this .net error, Converting 2012 to 2018 so they can be used in 2022.2. Any help would be appreciated. Thanks
Can you click "Details" and copy/paste that content here?
RE: PC-DMIS Measurement Routine Migrations by sscandlon: My windows software is blocking me from downloading the utility's
RE: PC-DMIS Measurement Routine Migrations by Neil Challinor: sscandlon Windows automatically blocks .exe files but you should be able to override that and download it anyway. Generally you will see a warning when you try to download - click on the ... and select "keep"
This will generally throw up another warning, click "show more" and then "keep anyway"
Finally, when you try to install, windows will show another message. Again, click "more" and then "Run anyway"
Depending on what policies you have in place, you may need assistance from your companies IT representative.
Attached Files
RE: PC-DMIS Measurement Routine Migrations by DJAMS: Rather than running as admin, we set the registry key. Computer\HKEY_CLASSES_ROOT\PCDLRN.Application\CLSID so that All Users of the computer have full control. This way when different versions are launched, class ID can be updated. This was the solution for being able to run Cypress Enable scripts across different versions. At defense companies, getting admin rights is not a simple thing.
I do not know if this is appropriate for this conversion process though.
maybe neil.challinor could chime in on this.
RE: PC-DMIS Measurement Routine Migrations by Kp61dude!: Wow, you! Hey man!